WASH.CGI.Fields
- class Reason a where
- newtype EmailAddress = EmailAddress {}
- newtype CreditCardNumber = CreditCardNumber {}
- data CreditCardExp = CreditCardExp {}
- newtype NonEmpty = NonEmpty {
- unNonEmpty :: String
- newtype Phone = Phone {}
- newtype AllDigits = AllDigits {}
- newtype Text = Text {}
- newtype Password = Password {
- unPassword :: String
- data Optional a
- fromPresent :: Optional a -> a
- fromOptional :: a -> Optional a -> a
Documentation
method reason of this class maps a value of type a to an explanation of
the input syntax for a value of type a
Instances
| Reason Bool | |
| Reason Char | |
| Reason Double | |
| Reason Float | |
| Reason Int | |
| Reason Integer | |
| Reason () | |
| Reason ISOTime | |
| Reason ISODate | Date and time in ISO8601 format |
| Reason ISODateAndTime | |
| Reason FileReference | |
| Reason URL | |
| Reason Password | |
| Reason Text | |
| Reason AllDigits | |
| Reason Phone | |
| Reason NonEmpty | |
| Reason CreditCardExp | |
| Reason CreditCardNumber | |
| Reason EmailAddress | |
| Reason a => Reason [a] | |
| Reason a => Reason (Optional a) | |
| (Reason a, Reason b) => Reason (a, b) | |
| (Reason a, Reason b, Reason c) => Reason (a, b, c) |
newtype EmailAddress Source
Reads an email address according to RFC 2822
Constructors
| EmailAddress | |
Fields | |
Instances
newtype CreditCardNumber Source
Reads a credit card number and performs Luhn check on it.
Constructors
| CreditCardNumber | |
Fields | |
Non-empty strings.
Constructors
| NonEmpty | |
Fields
| |
Phone numbers.
Non-empty strings of digits.
Constructors
| AllDigits | |
Fields | |
Arbitrary string data. No quotes required.
A Password is a string of length >= 8 with characters taken from at least three of the four sets: lower case characters, upper case characters, digits, and special characters.
Constructors
| Password | |
Fields
| |
fromPresent :: Optional a -> aSource
Analogous to Maybe.fromJust
fromOptional :: a -> Optional a -> aSource
Analogous to Maybe.fromMaybe