must method
Custom predicate validator.
Implementation
PropertyRuleBuilder<T, V> must(
bool Function(V value) predicate,
String errorMessage,
) {
_validators.add((val) {
if (!predicate(val)) {
return errorMessage;
}
return null;
});
return this;
}