Formless.Retrieve
- Package
- purescript-formless-aj
- Repository
- ajnsit/purescript-formless-independent
A module with functions for retriving particular fields from a form
#getField Source
getField :: forall o i e. FormFieldGet e i o (Record (FormFieldRow e i o))
Given a form, get the field at the specified symbol
#getInput Source
getInput :: forall o i e. FormFieldGet e i o i
Given a form, get the input at the specified symbol
#getTouched Source
getTouched :: forall o i e. FormFieldGet e i o Boolean
Given a form, get the touched field at the specified symbol
#getResult Source
getResult :: forall o i e. FormFieldGet e i o (FormFieldResult e o)
Given a form, get the result at the specified symbol
#getError Source
getError :: forall o i e. FormFieldGet e i o (Maybe e)
Given a form, get the error (if it exists) at the specified symbol
#getOutput Source
getOutput :: forall o i e. FormFieldGet e i o (Maybe o)
Given a form, get the output (if it exists) at the specified symbol
#getInputAll Source
getInputAll :: GetAll GetInputField
Get the form as a record where all fields are only the input value
#getTouchedAll Source
getTouchedAll :: GetAll GetTouchedField
Get the form as a record where all fields are only the touched value
#getResultAll Source
getResultAll :: GetAll GetResultField
Get the form as a record where all fields are only the result value
#getErrorAll Source
getErrorAll :: GetAll GetError
Get the form as a record where all fields are only the error value
#getOutputAll Source
getOutputAll :: GetAll GetOutput
Get the form as a record where all fields are only the output value
#_Field Source
_Field :: forall o i e. FormFieldLens e i o (Record (FormFieldRow e i o))
A lens to operate on the field at a given symbol in your form
#_FieldInput Source
_FieldInput :: forall o i e. FormFieldLens e i o i
A lens to operate on the input at a given symbol in your form
#_FieldTouched Source
_FieldTouched :: forall o i e. FormFieldLens e i o Boolean
A lens to operate on the 'touched' field at a given symbol in your form
#_FieldResult Source
_FieldResult :: forall o i e. FormFieldLens e i o (FormFieldResult e o)
A lens to operate on the 'result' field at a given symbol in your form
#_FieldError Source
_FieldError :: forall o i e t0 fields form sym. IsSymbol sym => Newtype (form Record FormField) (Record fields) => Cons sym (FormField e i o) t0 fields => SProxy sym -> Traversal' (form Record FormField) e
A traversal to operate on the possible error inside the 'result' field at a given symbol in your form
#_FieldOutput Source
_FieldOutput :: forall o i e t0 fields form sym. IsSymbol sym => Newtype (form Record FormField) (Record fields) => Cons sym (FormField e i o) t0 fields => SProxy sym -> Traversal' (form Record FormField) o
A traversal to operate on the possible output inside the 'result' field at a given symbol in your form
#FormFieldGet Source
type FormFieldGet e i o x = forall t0 fields form sym. IsSymbol sym => Newtype (form Record FormField) (Record fields) => Cons sym (FormField e i o) t0 fields => SProxy sym -> form Record FormField -> x
A type representing a function to produce a value from a record of
form fields given a particular symbol. The result of view
from
Data.Lens applied with a particular lens to the form.
#GetInputField Source
data GetInputField
Data constructor for the getInputField function
Constructors
Instances
Mapping GetInputField (FormField e i o) i
#GetTouchedField Source
data GetTouchedField
Data constructor for the getTouchedField function
Constructors
Instances
Mapping GetTouchedField (FormField e i o) Boolean
Heterogeneous type class for the getTouchedField function
#GetResultField Source
data GetResultField
Data constructor for the getResultField function
Constructors
Instances
Mapping GetResultField (FormField e i o) (FormFieldResult e o)
Heterogeneous type class for the getResultField function
Heterogeneous type class for the getInputField function