url method
Checks if the value is a url
message
is the message to return if the validation fails
Implementation
EzValidator<T> url([String? message]) => addValidation((v, [_]) {
if (v is String) {
return urlRegExp.hasMatch(v)
? null
: message ?? EzValidator.globalLocale.url(v, label);
}
return 'Invalid type for url validation';
});