| Safe Haskell | None | 
|---|---|
| Language | Haskell98 | 
Yesod.Form.Types
Contents
- data Enctype
- data FormResult a- = FormMissing
- | FormFailure [Text]
- | FormSuccess a
 
- data FormMessage- = MsgInvalidInteger Text
- | MsgInvalidNumber Text
- | MsgInvalidEntry Text
- | MsgInvalidUrl Text
- | MsgInvalidEmail Text
- | MsgInvalidTimeFormat
- | MsgInvalidHour Text
- | MsgInvalidMinute Text
- | MsgInvalidSecond Text
- | MsgInvalidDay
- | MsgCsrfWarning
- | MsgValueRequired
- | MsgInputNotFound Text
- | MsgSelectNone
- | MsgInvalidBool Text
- | MsgBoolYes
- | MsgBoolNo
- | MsgDelete
 
- type Env = Map Text [Text]
- type FileEnv = Map Text [FileInfo]
- data Ints
- type MForm m a = RWST (Maybe (Env, FileEnv), HandlerSite m, [Lang]) Enctype Ints m a
- newtype AForm m a = AForm {- unAForm :: (HandlerSite m, [Text]) -> Maybe (Env, FileEnv) -> Ints -> m (FormResult a, [FieldView (HandlerSite m)] -> [FieldView (HandlerSite m)], Ints, Enctype)
 
- data Field m a = Field {- fieldParse :: [Text] -> [FileInfo] -> m (Either (SomeMessage (HandlerSite m)) (Maybe a))
- fieldView :: FieldViewFunc m a
- fieldEnctype :: Enctype
 
- data FieldSettings master = FieldSettings {}
- data FieldView site = FieldView {}
- type FieldViewFunc m a = Text -> Text -> [(Text, Text)] -> Either Text a -> Bool -> WidgetT (HandlerSite m) IO ()
Helpers
The encoding type required by a form. The ToHtml instance produces values
 that can be inserted directly into HTML.
Constructors
| UrlEncoded | |
| Multipart | 
data FormResult a #
A form can produce three different results: there was no data available, the data was invalid, or there was a successful parse.
The Applicative instance will concatenate the failure messages in two
 FormResults.
Constructors
| FormMissing | |
| FormFailure [Text] | |
| FormSuccess a | 
Instances
| Functor FormResult # | |
| Applicative FormResult # | |
| Foldable FormResult # | Since: 1.4.5 | 
| Traversable FormResult # | Since: 1.4.5 | 
| Show a => Show (FormResult a) # | |
| Semigroup m => Semigroup (FormResult m) # | |
| Monoid m => Monoid (FormResult m) # | |
data FormMessage #
Constructors
Instances
Form
Constructors
| AForm | |
| Fields 
 | |
Build forms
Constructors
| Field | |
| Fields 
 | |