passwordValidationWithSpecialCharacters static method
dynamic
passwordValidationWithSpecialCharacters()
Implementation
static passwordValidationWithSpecialCharacters(String password,int minPasswordLength,int maxPasswordLength,String passRegExp){
bool status=false;
//checking password field is empty or not
if(password.isNotEmpty) {
//checking wheather the password length with in range or not
if ((password.length > minPasswordLength) &&
(password.length < maxPasswordLength)) {
//validating password with regular expressions
if (RegExp(passRegExp).hasMatch(password)) {
status = true;
}
else {
status = false;
}
}
else {
status = false;
}
}
return status;
}