Form.Field
Allows creating a list of form fields using normal list syntax with a local open (e.g. Field.[bool("remember-me"), string("username")]
Used to create a form field list.
val bool : string -> bool t
bool(name)
returns a boolean field named name
.
ensure(pred, field)
returns a field that will succeed decoding a value a
of type 'a
if pred(a)
is true
. Otherwise it will fail decoding.
val float : string -> float t
float(name)
returns a float field named name
.
val int : string -> int t
int(name)
returns an integer field named name
.
make(name, decoder)
returns a field with a decoder
of type 'a
.
val string : string -> string t
string(name)
returns a string field named name
.