case class Field(form: Form[_], name: String, constraints: Seq[(String, Seq[Any])], format: Option[(String, Seq[Any])], errors: Seq[FormError], value: Option[String]) extends Product with Serializable
Ordering
- Alphabetic
- By Inheritance
Inherited
- Field
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Field(form: Form[_], name: String, constraints: Seq[(String, Seq[Any])], format: Option[(String, Seq[Any])], errors: Seq[FormError], value: Option[String])
- name
the field name
- constraints
the constraints associated with the field
- format
the format expected for this field
- errors
the errors associated to this field
- value
the field value, if any
Value Members
- def apply(key: String): Field
Retrieve a field from the same form, using a key relative to this field key.
Retrieve a field from the same form, using a key relative to this field key.
- key
Relative key.
- val constraints: Seq[(String, Seq[Any])]
- lazy val error: Option[FormError]
Returns the first error associated with this field, if it exists.
Returns the first error associated with this field, if it exists.
- returns
an error
- val errors: Seq[FormError]
- val format: Option[(String, Seq[Any])]
- lazy val hasErrors: Boolean
Check if this field has errors.
- lazy val id: String
The field ID - the same as the field name but with '.' replaced by '_'.
- lazy val indexes: Seq[Int]
Retrieve available indexes defined for this field (if this field is repeated).
- lazy val label: String
The label for the field.
The label for the field. Transforms repeat names from foo[0] etc to foo.0.
- val name: String
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val value: Option[String]
A form field.
the field name
the constraints associated with the field
the format expected for this field
the errors associated to this field
the field value, if any