|
|
|
|
@ -100,8 +100,8 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
|
|
|
|
|
passwordConstraintsUI(LocaleKeys.doNotUseRecentPassword.tr(), true),
|
|
|
|
|
8.height,
|
|
|
|
|
passwordConstraintsUI(LocaleKeys.atLeastOneLowercase.tr(), checkRegEx(r'[a-z]')),
|
|
|
|
|
8.height,
|
|
|
|
|
passwordConstraintsUI(LocaleKeys.atLeastOneUppercase.tr(), checkRegEx(r'[A-Z]')),
|
|
|
|
|
// 8.height,
|
|
|
|
|
// passwordConstraintsUI(LocaleKeys.atLeastOneUppercase.tr(), checkRegEx(r'[A-Z]')),
|
|
|
|
|
8.height,
|
|
|
|
|
passwordConstraintsUI(LocaleKeys.atLeastOneNumeric.tr(), checkRegEx(r'[0-9]')),
|
|
|
|
|
8.height,
|
|
|
|
|
@ -131,14 +131,14 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool hasUppercase = password.contains(RegExp(r'[A-Z]'));
|
|
|
|
|
// bool hasUppercase = password.contains(RegExp(r'[A-Z]'));
|
|
|
|
|
bool hasDigits = password.contains(RegExp(r'[0-9]'));
|
|
|
|
|
bool hasLowercase = password.contains(RegExp(r'[a-z]'));
|
|
|
|
|
bool hasSpecialCharacters = password.contains(RegExp(r'[!@#$%^&*(),.?":{}|<>]'));
|
|
|
|
|
bool hasMinLength = password.length >= minLength;
|
|
|
|
|
bool isMatched = password == confirmPassword.text;
|
|
|
|
|
|
|
|
|
|
return hasDigits && hasUppercase && hasLowercase && hasSpecialCharacters && hasMinLength && isMatched && checkRepeatedChars(password);
|
|
|
|
|
return hasDigits && hasLowercase && hasSpecialCharacters && hasMinLength && isMatched && checkRepeatedChars(password);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool checkRepeatedChars(String password) {
|
|
|
|
|
|