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