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

minLength and maxLength is not working with number #92

Open
karthickapps opened this issue Jan 9, 2015 · 1 comment
Open

minLength and maxLength is not working with number #92

karthickapps opened this issue Jan 9, 2015 · 1 comment

Comments

@karthickapps
Copy link

minLength and maxLength is not working along with the type number or integer

Note: It will be useful to count phone number, pincode etc.

For example :

          var revalidator = require('revalidator');

          console.dir(revalidator.validate({pincode:3333}, {
                        properties: {
                                             pincode: {
                                                   message: 'Error',
                                                   type: 'number',
                                                   minLength: 5,
                                                   required:true
                                               }
                                            }
          }));
@AaronJan
Copy link

use option case:

I was having the same problem as you yours.

I was wrong. Now I'm wondering what does option case do..

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