[formtypes] Add FormFieldRegistry.register(String, FormField.Type, String...)

This commit is contained in:
Florian Schmaus 2021-12-15 20:14:18 +01:00
parent fc7fc10c69
commit e1845a52ca
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,12 @@ public class FormFieldRegistry {
}
}
public static void register(String formType, FormField.Type fieldType, String... fieldNames) {
for (String fieldName : fieldNames) {
register(formType, fieldName, fieldType);
}
}
public static void register(String formType, String fieldName, FormField.Type fieldType) {
StringUtils.requireNotNullNorEmpty(fieldName, "fieldName must be provided");
Objects.requireNonNull(fieldType);