containsValueFn method
FieldValidator<T, Map<TKey, TValue> >
containsValueFn(
- ValueGetter<
TValue> value, [ - MessageCallBack<
Map< ? messageTKey, TValue> >
check if the value contains value
Implementation
FieldValidator<T, Map<TKey, TValue>> containsValueFn(
ValueGetter<TValue> value,
[MessageCallBack<Map<TKey, TValue>>? message]) {
return next((messages, v) {
var val = value();
return !v.containsValue(val)
? message?.call(messages, v) ?? messages.containsItem(val)
: null;
});
}