Errors with unicode regexps #441

Closed
bishma-stornelli opened this Issue Nov 22, 2012 · 1 comment

Comments

Projects
None yet
2 participants

I'm using this regexp to validate a name in my model: /^(\p{Alpha}| )*$/i.

According to http://stackoverflow.com/questions/6381752/validating-users-utf-8-name-in-javascript, it's not possible in javascript and there's a plugin to make it possible.

Anyway, I'm getting the error everytime and I can't send the form because the field doesn't match the regexp.

Contributor

bcardarella commented Nov 22, 2012

You need to use a regexp that can convert to JavaScript. I suggest writing the regexp in JavaScript first and use that syntax for your validation

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