Module
Polyform.Input.Foreign
- Package
- purescript-polyform
- Repository
- paluh/purescript-polyform
#FieldErr Source
type FieldErr = Variant (value :: MultipleErrors)
WARNING! It is still prototyping phase of this module.
#ArrayField Source
type ArrayField attrs e val = Field attrs (Array e) (Array val)
Val is a self reference to an object
#AttrErr Source
#attr Source
attr :: forall v m field e. Monad m => (e -> field) -> String -> Validation m e Foreign v -> Validation m (Array (Attr field)) Foreign v
You should define your fields using something like:
data MyField = IntField (IntField ()) | StringField (StringField ()) | NumberField (NumberField ()) | Object (Attrs MyField)
What is really imporant is that Attrs
wrapper should be recursive.
#object Source
object :: forall v m field. Monad m => (Array (Attr field) -> field) -> Validation m (Array (Attr field)) Foreign v -> Validation m field Foreign v
#arrayFieldsValidation Source
arrayFieldsValidation :: forall v m e. Monad m => Validation m e Foreign v -> Validation m (Array e) (Array Foreign) (Array v)
#arrayValidation Source
arrayValidation :: forall t236 t198 t194 t191. Monad t198 => Validation t198 t194 Foreign t191 -> Validation t198 (Array (Variant (array :: MultipleErrors, values :: Array t194 | t236))) Foreign (Array t191)
#intValidation Source
intValidation :: forall err m. Monad m => Validation m (Array (Variant (value :: MultipleErrors | err))) Foreign Int
#stringValidation Source
stringValidation :: forall err m. Monad m => Validation m (Array (Variant (value :: MultipleErrors | err))) Foreign String
- Modules
- Polyform.
Field - Polyform.
Field. Generic - Polyform.
Field. Generic. Option - Polyform.
Field. Html5 - Polyform.
Field. Validation. Combinators - Polyform.
Form. Component - Polyform.
Input. Foreign - Polyform.
Input. Http - Polyform.
Input. Interpret - Polyform.
Input. Interpret. Http - Polyform.
Input. Interpret. Record - Polyform.
Input. Interpret. Validation - Polyform.
Validation - Polyform.
Validation. Par