-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature string validators #25
Conversation
Add tests to check whether an length validator has been added
Or @jhnns ? |
} | ||
}); | ||
|
||
expect(schema.validators.name).to.be.an("array"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small thing, but I think it should be: expect(schema.validators.name).to.be("array");
, because name
should not be an array, but it should be the string "array"
. The test is ok though, it's just for the developer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, sorry. You're right :)
That's a nice feature, but it should not be restricted to strings. Everything with a length attribute should be validatable. |
Actually the |
Naming should be general if appropriate
Apply proper operation
Make sure there is an lengthable which could be evaluated
Nice! That's pretty close to mongoose! Thanks! |
Looks good! Thanks! |
closes #23
@meaku could you please review the code?