One case class field, as HTML sees it.
Deliberately not db's Column, which is PreparedStatement and ResultSet and nothing else. A model with no database behind it still has to form, and Login(email, password) is the case that proves it: it will never be a table, and it renders and parses like anything else.
absent is the whole reason the trait has four members rather than three. A browser omits an unchecked checkbox entirely rather than submitting false, so "the key is missing" has to be answerable per type. Rails answers it by rendering a hidden companion input before every checkbox and then relying on last-wins; that is a second mental model, and a value the server cannot distinguish from a genuine submission. Here Field[Boolean].absent is Some(false), Field[Option[X]].absent is Some(None), and everything else is None, which is exactly the set of fields that can report "is required".
Attributes
- Companion
- object
- Source
- Field.scala
- Graph
-
- Supertypes