equalTo method
Implementation
JarString equalTo(String field, [String? message]) {
return addValidator((value) {
if (value == null) return null;
final otherValue = getFieldValue(field);
return value == otherValue
? null
: (message ?? 'Must be equal to $field');
});
}