1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-19 02:22:05 +01:00

[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

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);