onValidate method
- PhoneNumber? value,
- String validationMessage
override
onValidate is used to validate the given input by the user.
Implementation
@override
String? onValidate(
input.PhoneNumber? value,
String validationMessage,
) {
if (mandatory) {
if (value == null || value.number == null) {
return validationMessage;
}
}
return null;
}