| Constructor and Description |
|---|
Field(Form<?> form,
String name,
List<F.Tuple<String,List<Object>>> constraints,
F.Tuple<String,List<Object>> format,
List<ValidationError> errors,
String value)
Creates a form field.
|
| Modifier and Type | Method and Description |
|---|---|
List<F.Tuple<String,List<Object>>> |
constraints()
Returns all the constraints associated with this field.
|
List<ValidationError> |
errors()
Returns all the errors associated with this field.
|
F.Tuple<String,List<Object>> |
format()
Returns the expected format for this field.
|
Optional<String> |
getName() |
Optional<String> |
getValue() |
List<Integer> |
indexes() |
String |
name()
Deprecated.
Deprecated as of 2.6.0. Use
getName() instead. |
Form.Field |
sub(String key)
Get a sub-field, with a key relative to the current field.
|
String |
toString() |
String |
value()
Deprecated.
Deprecated as of 2.6.0. Use
getValue() instead. |
String |
valueOr(String or)
Deprecated.
Deprecated as of 2.6.0. Use
getValue() instead. |
public Field(Form<?> form, String name, List<F.Tuple<String,List<Object>>> constraints, F.Tuple<String,List<Object>> format, List<ValidationError> errors, String value)
form - the form.name - the field nameconstraints - the constraints associated with the fieldformat - the format expected for this fielderrors - the errors associated with this fieldvalue - the field value, if any@Deprecated public String name()
getName() instead.@Deprecated public String value()
getValue() instead.@Deprecated public String valueOr(String or)
getValue() instead.or - the value to return if value is null.public List<ValidationError> errors()
public List<F.Tuple<String,List<Object>>> constraints()
public F.Tuple<String,List<Object>> format()
public List<Integer> indexes()
public Form.Field sub(String key)
key - the key