uuid static method
FormFieldValidator that requires the field's value to be a valid UUID.
Parameters:
errorText
The error message when the UUID is invalid.checkNullOrEmpty
Whether to check for null or empty values.
This regex matches UUIDs (version 4).
- It validates the format of a UUID, including hyphens.
Examples: 123e4567-e89b-12d3-a456-426614174000
Implementation
static FormFieldValidator<String> uuid({
String? errorText,
bool checkNullOrEmpty = true,
}) => UuidValidator(
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;