Fable.Modulo


FormInputModel<'f, 't> Type

The form field model, used for "input" elements

Record fields

Record Field Description

Formatter

Full Usage: Formatter

Field type: 't -> string

Gets a string representation of the underlying value

Field type: 't -> string

Layout

Full Usage: Layout

Field type: FormFieldLayout

Layout options

Field type: FormFieldLayout

Parser

Full Usage: Parser

Field type: string -> Result<'t, string>

Parser for the given type

Field type: string -> Result<'t, string>

Text

Full Usage: Text

Field type: string

Input text

Field type: string

Updater

Full Usage: Updater

Field type: FormInputModel<'f, 't> -> 'f -> 'f

A function that updates the form with the current field.

Field type: FormInputModel<'f, 't> -> 'f -> 'f
Example

Usually just something such as

(fun item form -> {form with MyItem = item})

Validator

Full Usage: Validator

Field type: ('f -> 't -> Result<'t, string>) option

Validate the field's value, possibly against the whole form

Field type: ('f -> 't -> Result<'t, string>) option

Value

Full Usage: Value

Field type: Result<'t, string>

Parsed and validated value

Field type: Result<'t, string>

Instance members

Instance member Description

this.UpdateForm

Full Usage: this.UpdateForm

Parameters:
    form : 'f

Returns: 'f

Update the parent form with this item's value

form : 'f
Returns: 'f

this.Validate

Full Usage: this.Validate

Parameters:
    form : 'f
    value : Result<'t, string>

Returns: Result<'t, string>

Validate the given value against the given form using this field's validator if defined

form : 'f
value : Result<'t, string>
Returns: Result<'t, string>