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

Consider combining required and type validator #2

Open
mokkabonna opened this issue Oct 9, 2017 · 0 comments
Open

Consider combining required and type validator #2

mokkabonna opened this issue Oct 9, 2017 · 0 comments

Comments

@mokkabonna
Copy link
Owner

It can be a bit verbose now.

The required validator is now mainly there for avoiding programatically setting the value to undefined.

If the required validator also validated the type then it would be fewer validators.

I any case all validators should only kick in if the type validator passes. This creates an overlap that causes 2 errors to be shown unnecessarily. Currently it only requires the required validator to pass.

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

No branches or pull requests

1 participant