Examples
Running examples
Note: Elm reactor (0.17) doesn't load external CSS
- Install elm if you haven't
- Clone the repository:
git clone https://github.com/shelakel/elm-validate.git cd elm-validate- Install the dependencies for the main package:
elm make cd examples- Install the dependencies for the examples:
elm make - Run elm reactor:
elm reactor -a=localhost - Open up [localhost:8000] (http://localhost:8000/) to run examples
Forgot password
The forgot password example demonstrates:
Creating custom validators
- Creating a custom synchronous validator (validateUsernameOrEmail)
- Creating a custom asynchronous validator (checkUsernameExists)
Field, non-field and model validation
- Synchronous field validation (validateEmail)
- Asynchronous field validation (validateUsername)
- Non-field combination type validation (validateUsernameOrEmail)
- Model validation (validateModel) (WIP)
Custom validation state
- Storing custom validation state (checkUsernameExists)
- Throttling of requests (TO DO)