Constructor and Description |
---|
Field(Form<?> form,
String name,
List<F.Tuple<String,List<Object>>> constraints,
F.Tuple<String,List<Object>> format,
List<ValidationError> errors,
Http.MultipartFormData.FilePart<?> file) |
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.
|
Field(Form<?> form,
String name,
List<F.Tuple<String,List<Object>>> constraints,
F.Tuple<String,List<Object>> format,
List<ValidationError> errors,
String value,
Http.MultipartFormData.FilePart<?> file) |
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.
|
<A> Optional<Http.MultipartFormData.FilePart<A>> |
file() |
F.Tuple<String,List<Object>> |
format()
Returns the expected format for this field.
|
List<Integer> |
indexes() |
Optional<String> |
name() |
Form.Field |
sub(String key)
Get a sub-field, with a key relative to the current field.
|
Form.Field |
sub(String key,
Lang lang)
Get a sub-field, with a key relative to the current field.
|
String |
toString() |
Optional<String> |
value() |
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 anypublic Field(Form<?> form, String name, List<F.Tuple<String,List<Object>>> constraints, F.Tuple<String,List<Object>> format, List<ValidationError> errors, Http.MultipartFormData.FilePart<?> file)
public <A> Optional<Http.MultipartFormData.FilePart<A>> file()
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 keypublic Form.Field sub(String key, Lang lang)
key
- the keylang
- used for formatting