isPassword static method
validation password
like password pattern
Min 6 and Max 12 characters
At least one uppercase character
At least one lowercase character
At least one number
At least one special character @#$!%?
Implementation
static bool isPassword(String password) {
return RegExp(
r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@#$!%?])[A-Za-z\d@#$!%?]{6,12}$')
.hasMatch(password);
}