Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update validators docs #31

Merged
merged 1 commit into from
Feb 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ It is passed as a param to the form, `<SignInForm schema>`

ReForm accepts a validation schema that looks like
```reason
(fieldName, getter, validator)
(fieldName, validator)
```
or

```reason
(`email, s => s.email, Email)
(`email, Email)
```

Take a look in the demo to see it in action.
Expand All @@ -230,17 +230,17 @@ Take a look in the demo to see it in action.

#### Custom(state => option(string))
```reason
(`password, s => s.password, Custom(values => values.password == "123" ? Some("Really?") : None))
(`password, Custom(values => values.password == "123" ? Some("Really?") : None))
```
#### Required
```reason
(`fullName, s => s.fullName, Required)
(`fullName, Required)
```
#### Email
```reason
(`email, s => s.email, Email)
(`email, Email)
```

#### Any doubts?

If you have any doubts don't hesitate to reach out the wonderful https://discord.gg/reasonml
If you have any doubts don't hesitate to reach out the wonderful https://discord.gg/reasonml or https://reasonml.chat