sha256 / Pristine

Vanilla javascript form validation micro-library
https://pristine.js.org/
MIT License
410 stars 81 forks source link

Validating the number of characters #54

Open sanchopanda opened 3 years ago

sanchopanda commented 3 years ago

I want to add password validation, but code from the example https://pristine.js.org/demo.html gives the error

Uncaught TypeError: Cannot read property '1' of null

From https://github.com/sha256/Pristine/issues/10#issuecomment-486376816 i found out that the reason is in the comma. RegEx *"/^(?=.?[A-Z])(?=.?[a-z])(?=.?[0-9]).{8,}$/"** contains commas. But in the example everything works, what can be done to make the pattern work?

jshrssll commented 3 years ago

Any update on this? I have the same issue