passwordValidator function
Implementation
String? passwordValidator(String? value, int minLength, String invalidMessage, bool toastIfInvalid) {
var validatedValue = value == null || value.length < minLength ? invalidMessage : VALID;
if (validatedValue != null && toastIfInvalid) showToast(invalidMessage);
return validatedValue;
}