valid static method
Implementation
static PhoneNumberInputValidator valid(
BuildContext context, {
/// custom error message
String? errorText,
}) {
return (PhoneNumber? valueCandidate) {
if (valueCandidate != null &&
valueCandidate.nsn.isNotEmpty &&
!valueCandidate.isValid()) {
return errorText ??
PhoneFieldLocalization.of(context).invalidPhoneNumber;
}
return null;
};
}