zhorton34 / vuejs-validators

Javascript Validation Simplified (Usable Outside Of Vuejs)
https://cleancode.studio
4 stars 6 forks source link

Rules Regex is wrong type (string) #27

Closed cuongbuoi closed 3 years ago

cuongbuoi commented 3 years ago

image

typeof parameters[0] is string, must object

to fix this issue: regex: ({ value, parameters }) => new RegExp(parameters[0]).test(value),

zhorton34 commented 3 years ago

@cuongbuoi Any chance you're able to throw that change in and a quick pr? Haven't touched the code in a minute and in the middle of an intense interview process at one of the FAANG companies so won't have time for at least a few weeks.