georgesboris/elm-widgets-alpha/4.2.0

NOTE: the latest version is 4.18.3

W.InputText

List (Attribute msg)
-> { onInput : String -> msg
, value : String
}
-> Html msg
type alias Attribute msg =
Attr (Attributes msg)

Types

email : Attribute msg
password : Attribute msg
telephone : Attribute msg
url : Attribute msg
numeric : Attribute msg
decimal : Attribute msg

Styles

small : Attribute msg
placeholder : String -> Attribute msg
mask : (String -> String) -> Attribute msg
prefix : List (Html msg) -> Attribute msg
suffix : List (Html msg) -> Attribute msg

States

autofocus : Attribute msg
disabled : Attribute msg
readOnly : Attribute msg

Actions

onEnter : msg -> Attribute msg
onFocus : msg -> Attribute msg
onBlur : msg -> Attribute msg

Validation Attributes

required : Attribute msg
minLength : Int -> Attribute msg
maxLength : Int -> Attribute msg
exactLength : Int -> Attribute msg
pattern : String -> Attribute msg
validation : (String -> Maybe String) -> Attribute msg

View With Validation

List (Attribute msg)
-> { value : String
, onInput : Result (List Error) String -> String -> msg
}
-> Html msg
errorToString : Error -> String
type Error
= PatternMismatch String
| TypeMismatch String
| TooLong Int String
| TooShort Int String
| ValueMissing String
| Custom String

Html

id : String -> Attribute msg