forbidFields method
Implementation
JarObject forbidFields(List<String> fieldNames, [String? message]) {
return addValidator((value) {
if (value == null) return null;
for (final field in fieldNames) {
if (value.containsKey(field)) {
return message ?? 'The field $field is not allowed';
}
}
return null;
});
}