This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0 1.0.1
We were not able to find the expected elm-package.json file at this tag.
Tag 2.0.0
Committed At 2018-12-03 00:37:25 UTC

Modules

    README

    elm-validation

    Tools for managing validity and error state of data, e.g. from user input.

    To install

    $ elm install ericgj/elm-validation
    

    Example

    Basic usage for validation in an HTML form.

    view : Form -> Html Msg
    view form =
        div []
            [ input
                [ type_ "text"
                , value
                    (form.input
                        |> Validation.toString identity
                    )
                , onInput
                    (Validation.validate isRequired
                        >> SetInput
                    )
                ]
                []
            , div 
                [ class "error" ]
                [ text
                    (Validation.message form.input
                        |> Maybe.withDefault ""
                    )
                ]
            ]
    

    Combining validation of form fields to determine overall validity of a model. (For example, this could be used to determine if the submit button should be enabled on the form.)

    validateForm : Form -> ValidationResult Model
    validateForm form =
        Validation.valid Model
            |> Validation.andMap form.field1
            |> Validation.andMap form.field2
    

    See the Elm package for full usage docs.