unique<T> static method
FormFieldValidator that checks if the value is unique in a list of values.
Parameters:
values
The list of values to check against.errorText
The error message when the value is not unique.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<T> unique<T>(
List<T> values, {
String? errorText,
bool checkNullOrEmpty = true,
}) => UniqueValidator<T>(
values,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;