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

Add examples #16

Open
1 task
diegohaz opened this issue Feb 16, 2018 · 3 comments
Open
1 task

Add examples #16

diegohaz opened this issue Feb 16, 2018 · 3 comments

Comments

@diegohaz
Copy link
Owner

  • redux-form
@rytyr
Copy link

rytyr commented Mar 21, 2018

+1 for validation using regex

@diegohaz
Copy link
Owner Author

diegohaz commented Mar 21, 2018

Hi, @rytyr.

Do you mean something like this?

const mySchema = schema({
  title: {
    type: String,
    match: /^[A-Z0-9]/ // should be capitalized
  }
})

mySchema.validate({ title: 'wrong' })
mySchema.validate({ title: 'Right' })

@rytyr
Copy link

rytyr commented Mar 24, 2018

@diegohaz exactly. I believe such use cases should be described in documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants