|
|
@@ -74,7 +74,7 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) => |
|
|
|
// Determine the color for each line based on the input value |
|
|
|
return helperTextLines.map((_, index) => { |
|
|
|
if ((index === 0 && inputValue.length < rules.min) || inputValue.length > rules.max) { |
|
|
|
// setError("newPassword", { type: "required" }) |
|
|
|
// testing length |
|
|
|
return "red"; |
|
|
|
} else if (index === 1 && rules.upperEng &&!/[A-Z]/.test(inputValue)) { |
|
|
|
//testing for uppercase letters |
|
|
|