validator method Null safety
- @override
- String? value
override
A function that must return a validation error if the provided
value
is invalid and null
otherwise.
Implementation
@override
PasswordValidationError? validator(String? value) {
return value?.trim().isNotEmpty == true
? null
: PasswordValidationError.empty;
}