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

Regex error #223

Closed
Armesh opened this issue Jan 9, 2017 · 2 comments
Closed

Regex error #223

Armesh opened this issue Jan 9, 2017 · 2 comments

Comments

@Armesh
Copy link

Armesh commented Jan 9, 2017

Versions:

  • VueJs: 2.1.6
  • Vee-Validate: 2.0.0-beta.18

Description:

Got error Invalid flags supplied to RegExp constructor '8}$' in Chrome console when using regex validation on input like this

<input v-validate data-vv-rules='regex:^[A-Za-z0-9\-]{6,8}$|required' type="text" name="sort code" v-model="bankSortCode" aria-required="true" />

The regex is valid and tested here https://regex101.com/

@logaretm
Copy link
Owner

logaretm commented Jan 9, 2017

The regex is valid, but the plugin reserves the pipes | and the commas , for parsing the rules.

Workaround is mentioned here #64 and there is a better solution coming up in this PR #202 which should be the next release.

@Armesh
Copy link
Author

Armesh commented Jan 10, 2017

Oh ok. Can't wait for the next release!

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