lib/password_strength.go
func (p *PasswordStrengthRequirements) sanityCheck() (bool, string) {
	if p.MaximumTotalLength == 0 {
		return true, ""
	}
	if p.MaximumTotalLength < p.MinimumTotalLength {
		return false, "maximum total length is less than minimum total length"
	}
	if p.MaximumTotalLength < p.Digits {
		return false, "maximum required digits is more than maximum total length"
	}
	if p.MaximumTotalLength < p.Punctuation {
		return false, "maximum required punctuation is more than maximum total length"
	}
	if p.MaximumTotalLength < p.Uppercase {
		return false, "maximum required uppercase characters is more than maximum total length"
	}
	if p.MaximumTotalLength < p.Digits+p.Uppercase+p.Punctuation {
		return false, "maximum required digits + uppercase + punctuation is more than maximum total length"
	}
	return true, ""
}
func (p *PasswordStrengthRequirements) sanityCheck() (bool, string) {
	if p.MaximumTotalLength == 0 {
		return true, ""
	}
	if p.MaximumTotalLength < p.MinimumTotalLength {
		return false, "maximum total length is less than minimum total length"
	}
	if p.MaximumTotalLength < p.Digits {
		return false, "maximum required digits is more than maximum total length"
	}
	if p.MaximumTotalLength < p.Punctuation {
		return false, "maximum required punctuation is more than maximum total length"
	}
	if p.MaximumTotalLength < p.Uppercase {
		return false, "maximum required uppercase characters is more than maximum total length"
	}
	if p.MaximumTotalLength < p.Digits+p.Uppercase+p.Punctuation {
		return false, "maximum required digits + uppercase + punctuation is more than maximum total length"
	}
	return true, ""
}
//Make sure password strength requirements make sense