Module
Data.Validation.Jaws.Http.Form
- Package
- purescript-jaws
- Repository
- paluh/purescript-jaws
#Field Source
data Field
Constructors
Input { label :: String, name :: String, value :: FormValue String }
Password { label :: String, name :: String, value :: FormValue String }
Number { label :: String, name :: String, value :: FormValue Int }
Select { label :: String, name :: String, options :: Array (Tuple String String), value :: FormValue String }
Checkbox { label :: String, name :: String, value :: Either (Tuple String Options) Options }
Instances
#FormValidation Source
newtype FormValidation m query e a
Constructors
FormValidation { init :: FormInit a, validation :: CoproductValidation m (Tuple Form e) query (Tuple Form a) }
#opts Source
opts :: forall t19683 t19671 t19655 t19648. Monad t19648 => CoproductValidation t19648 (Tuple { first :: Either (Variant ("on/off" :: String, scalar :: Array String | t19655)) Boolean, second :: Either (Variant ("on/off" :: String, scalar :: Array String | t19671)) Boolean, third :: Either (Variant ("on/off" :: String, scalar :: Array String | t19683)) Boolean } (Array Option)) (Array String) (Tuple { first :: Boolean, second :: Boolean, third :: Boolean } (Array Option))
#checkboxValue Source
checkboxValue :: forall t19519 t19517. Monad t19519 => CoproductValidation t19519 (Variant ("on/off" :: String | t19517)) String Boolean
#addFormFromQuery Source
addFormFromQuery :: forall vr' vr ir' ir s m form e a. IsSymbol s => Semigroup form => Monad m => RowLacks s ir => RowCons s (Either e a) ir ir' => RowLacks s vr => RowCons s a vr vr' => SProxy s -> (String -> CoproductValidation m (Tuple e form) QueryField (Tuple a form)) -> ProductValidation m Query (Tuple (Record ir) form) (Tuple (Record ir') form) (Tuple (Record vr) form) (Tuple (Record vr') form)
#recordFieldValidation Source
recordFieldValidation :: forall v' v tok m l form i' i e b. IsSymbol l => Semigroup form => Monad m => RowCons l (Either e b) i i' => RowCons l b v v' => RowLacks l i => RowLacks l v => Functor m => SProxy l -> (tok -> m (Either (Tuple e form) (Tuple b form))) -> ProductValidation m tok (Tuple (Record i) form) (Tuple (Record i') form) (Tuple (Record v) form) (Tuple (Record v') form)
#input Source
input :: forall m. Monad m => String -> String -> CoproductValidation m (Tuple _ Form) QueryField (Tuple _ Form)
#password Source
password :: forall m. Monad m => String -> String -> CoproductValidation m (Tuple _ Form) QueryField (Tuple _ Form)
#number Source
number :: forall m. Monad m => String -> String -> CoproductValidation m (Tuple _ Form) QueryField (Tuple _ Form)
#addForm Source
addForm :: forall v' v tok m l form i' i e b. IsSymbol l => Monoid form => Monad m => RowCons l (Either e b) i i' => RowCons l b v v' => RowLacks l i => RowLacks l v => Functor m => SProxy l -> CoproductValidation m (Tuple e form) tok (Tuple b form) -> ProductValidation m tok (Tuple (Record i) form) (Tuple (Record i') form) (Tuple (Record v) form) (Tuple (Record v') form)