FormField
class FormField[Owner, Input, Value] extends FormPart[Owner, Value]A field whose editable input and successfully refined value are separate types.
Fields are identity-owned by the FormRoot or RepeatedGroup that created them. Structural decoding is supplied by FieldInput; use emap for semantic refinement.
Defined by scalive.FormField. View source (scalive/api/src/scalive/forms/FormField.scala:23-97)
Methods10
emap
def emap[B](f: Value => Either[FieldIssues, B]): FormField[Owner, Input, B]Adds error-producing semantic refinement after structural input decoding.
Defined by scalive.FormField.emap. View source (scalive/api/src/scalive/forms/FormField.scala:58-59)
id
def id: StringTemplate DOM id; use id for a concrete repeated row.
Defined by scalive.FormField.id. View source (scalive/api/src/scalive/forms/FormField.scala:51-51)
initial
def initial(input: Input): FormFieldAssignment[Owner]Encodes a typed editable input for initialization or row construction.
Defined by scalive.FormField.initial. View source (scalive/api/src/scalive/forms/FormField.scala:81-82)
map
def map[B](f: Value => B): FormField[Owner, Input, B]Maps a successfully refined value without changing its editable input representation.
Defined by scalive.FormField.map. View source (scalive/api/src/scalive/forms/FormField.scala:54-55)
name
def name: StringBrowser field name for this static field or row-field template.
Defined by scalive.FormField.name. View source (scalive/api/src/scalive/forms/FormField.scala:48-48)
path
def path: FormPathThe complete static browser path, or relative row-field path for a row template.
Defined by scalive.FormField.path. View source (scalive/api/src/scalive/forms/FormField.scala:43-45)
raw
def raw(values: Vector[String]): FormFieldAssignment[Owner]Preserves explicit raw values for malformed-control tests and custom controls.
Unlike initial, this bypasses input encoding; validation still occurs when the form is built.
Defined by scalive.FormField.raw. View source (scalive/api/src/scalive/forms/FormField.scala:89-90)
required
def required(issue: FieldIssue = ...)(using valueIsString: =:=[Value, String]): FormField[Owner, Input, String]Rejects an empty refined string while preserving the field's original input type.
Defined by scalive.FormField.required. View source (scalive/api/src/scalive/forms/FormField.scala:74-78)
validate
def validate(issue: FieldIssue)(predicate: Value => Boolean): FormField[Owner, Input, Value]Retains values satisfying predicate and otherwise reports issue.
Defined by scalive.FormField.validate. View source (scalive/api/src/scalive/forms/FormField.scala:62-63)
validateAll
def validateAll(validate: Value => IterableOnce[FieldIssue]): FormField[Owner, Input, Value]Reports every issue produced for a structurally and semantically decoded value.
Defined by scalive.FormField.validateAll. View source (scalive/api/src/scalive/forms/FormField.scala:66-71)
Values1
address
val address: FormAddress[Owner]The static address or row-field template address.
Defined by scalive.FormField.address. View source (scalive/api/src/scalive/forms/FormField.scala:35-40)