You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'/i' flag in regex validation rule seems to do nothing. As seen in the Stackblitz, entering lowercase 'gnd' in the first TextElement should pass validation, as /i flag is set in regex.
Uh oh!
There was an error while loading. Please reload this page.
Environment
nuxt@3.12.3
vue@3.5.13
@vueform/nuxt@1.7.0
vueform@1.11.0
Reproduction
https://stackblitz.com/edit/github-l6wiwpjl?file=src%2FApp.vue
Describe the bug
'/i' flag in regex validation rule seems to do nothing. As seen in the Stackblitz, entering lowercase 'gnd' in the first TextElement should pass validation, as /i flag is set in regex.
To confirm, the same regex passes on regex101
https://regex101.com/r/Aeyzt1/1
This is especially bizarre, as the /i flag is even showcased in Vueform doc for regex patterns
https://vueform.com/docs/validating-elements#rule-regex
Additional context
seems like the problem lies in the .replace of src/services/validation/rules/regex.js
Executing this
results in this print:
/^GND$/ false
the /i flag is removed by the replacement regex
The text was updated successfully, but these errors were encountered: