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

Duns.string() should have case sensitivity option #56

Open
br0r opened this issue Jul 16, 2015 · 1 comment
Open

Duns.string() should have case sensitivity option #56

br0r opened this issue Jul 16, 2015 · 1 comment

Comments

@br0r
Copy link
Contributor

br0r commented Jul 16, 2015

var schema = Duns.string().oneOf('asc', 'desc').caseInsensitive() // or .insensitive perhaps, or any other shorthand.

schema.validate('ASC') //True
@br0r
Copy link
Contributor Author

br0r commented Jul 29, 2015

If this is implemented, it should probably always do .toLowerCase on param values or something. At least it should be able to mix it with a string regexp.

Duns.string('Foo').match('foo').caseInsensitive().validate(); //True

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