descriptive-0.2.0: Self-describing consumers/parsers; forms, cmd-line args, JSON, etc.

Safe HaskellSafe-Inferred
LanguageHaskell98

Descriptive.Form

Contents

Description

Validating form with named inputs.

Synopsis

Combinators

input :: Text -> Consumer (Map Text Text) Form Text Source

Consume any input value.

validate Source

Arguments

:: Text

Description of what it expects.

-> (a -> Maybe b)

Attempt to parse the value.

-> Consumer (Map Text Text) Form a

Consumer to add validation to.

-> Consumer (Map Text Text) Form b 

Validate a form input with a description of what's required.

Description

data Form Source

Form descriptor.

Constructors

Input !Text 
Constraint !Text 

Instances