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