Module

Data.Validation.Jaws.Http.Form

Package
purescript-jaws
Repository
paluh/purescript-jaws

#Form Source

data Form

This type is only used as html representation of validated values. Fully consitent and type safe values are additional result of validation.

Constructors

Instances

#FormValue Source

data FormValue a

Move to this representation

Constructors

Instances

#Value Source

type Value = String

#Checked Source

#Label Source

type Label = String

#Option Source

newtype Option

Constructors

Instances

#Options Source

#Field Source

data Field

Constructors

Instances

#FormInit Source

type FormInit a = a -> Form

Just prototype of form library.

#FormValidation Source

newtype FormValidation m query e a

Constructors

#inputFromRecordField Source

inputFromRecordField :: forall t19134 t19135 t19136 t19137. IsSymbol t19135 => RowCons t19135 t19134 t19136 t19137 => SProxy t19135 -> (t19134 -> Maybe String) -> Record t19137 -> Form

#numberFromRecordField Source

numberFromRecordField :: forall t19059 t19060 t19061 t19062. IsSymbol t19060 => RowCons t19060 t19059 t19061 t19062 => SProxy t19060 -> (t19059 -> Maybe Int) -> Record t19062 -> Form

#inputFromRecordFieldReq Source

inputFromRecordFieldReq :: forall t19149 t19150 t19151. IsSymbol t19151 => RowCons t19151 String t19150 t19149 => SProxy t19151 -> Record t19149 -> Form

#inputFromRecordFieldOpt Source

inputFromRecordFieldOpt :: forall t19141 t19142 t19143. IsSymbol t19143 => RowCons t19143 (Maybe String) t19142 t19141 => SProxy t19143 -> Record t19141 -> Form

#numberFromRecordFieldReq Source

numberFromRecordFieldReq :: forall t19074 t19075 t19076. IsSymbol t19076 => RowCons t19076 Int t19075 t19074 => SProxy t19076 -> Record t19074 -> Form

#numberFromRecordFieldOpt Source

numberFromRecordFieldOpt :: forall t19066 t19067 t19068. IsSymbol t19068 => RowCons t19068 (Maybe Int) t19067 t19066 => SProxy t19068 -> Record t19066 -> Form

#addOption' Source

addOption' :: forall b e i i' form l m tok v v'. IsSymbol l => Monad m => RowCons l (Either _ _) i i' => RowCons l _ v v' => RowLacks l i => RowLacks l v => Functor m => SProxy l -> ProductValidation m _ (Tuple (Record i) _) (Tuple (Record i') _) (Tuple (Record v) _) (Tuple (Record v') _)

#opts Source

opts :: forall t19648 t19655 t19671 t19683. 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 t19517 t19519. Monad t19519 => CoproductValidation t19519 (Variant ("on/off" :: String | t19517)) String Boolean

#addOption Source

addOption :: forall e l m. IsSymbol l => Monad m => (SProxy l) -> CoproductValidation m (Tuple (Variant ("on/off" :: String, scalar :: Array String | e)) (Array Option)) (Array String) (Tuple Boolean (Array Option))

#y Source

y :: forall t265. { age :: Maybe Int, bio :: Maybe String, password :: String | t265 } -> Form

#addFormFromQuery Source

addFormFromQuery :: forall a e form m s ir ir' vr vr'. 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 b e i i' form l m tok v v'. 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)

#runRecordValidation Source

runRecordValidation :: forall i form m tok v. Monad m => Monoid form => ProductValidation m tok (Tuple (Record ()) form) (Tuple (Record i) form) (Tuple (Record ()) form) (Tuple (Record v) form) -> (tok -> m (Either (Tuple (Record i) form) (Tuple (Record v) form)))

#addForm Source

addForm :: forall b e i i' form l m tok v v'. 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)

#buildRecord Source

buildRecord :: forall i form m v tok. Monad m => Monoid form => ProductValidation m tok (Tuple (Record ()) form) (Tuple (Record i) form) (Tuple (Record ()) form) (Tuple (Record v) form) -> CoproductValidation m (Tuple (Record i) form) tok (Tuple (Record v) form)