moeen-basra / ree-validate

Simple React.js input validation plugin extended from vee-validate
MIT License
16 stars 4 forks source link

Regex Problem #13

Closed FareedR closed 4 years ago

FareedR commented 4 years ago

Versions:

Description:

why I get error when I set regex like this this.validator = new Validator({ avatar: '', phone_no: 'numeric|max:12', address: 'regex:^[a-zA-Z0-9\s\.\-\/,]+$', city: 'regex:^[a-zA-Z\s]+$', postcode: 'numeric', state: 'regex:^[a-zA-Z\s]+$', country: 'regex:^[a-zA-Z\s]+$' }) this is example of test string on that regex https://regex101.com/r/tvUtu0/1

Error Occured :-

  1. Uncaught SyntaxError: Invalid flags supplied to RegExp constructor ']+$' ( IF I PUT REGEX ON COMMA )
  2. The address field format is invalid. ( IF I PUT REGEX ^ ...... + $ )
moeen-basra commented 4 years ago

Please use the version 3.0.2