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

Non-required rules give error on empty parameters #22

Open
asleire opened this issue Sep 14, 2017 · 0 comments
Open

Non-required rules give error on empty parameters #22

asleire opened this issue Sep 14, 2017 · 0 comments

Comments

@asleire
Copy link
Contributor

asleire commented Sep 14, 2017

The following sample should pass:

const data = {
  title: 'This is a title'
}

const rules = {
  title: 'required|min:2',
  description: 'min:20',
}

validate(data, rules)

However the description rule gives an error { description: 'The description field must be at least 20 characters.' }

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

1 participant