It looks like you're new here. If you want to get involved, click one of these buttons!
I'm having trouble with this regex:
regex = "/^[a-z]+ [a-z ,.'-]+$/i"
This is never true client side but if I disable js validation with
$form->js_validation = false;
it works as expected on the server side.
Are there any errors in your browser console? I wonder if there isn't an escape issue with the single-quote.
No error in browser console.
Chrome shows the re variable used for match =
/^[a-z]+ [a-z ,.'-]+$//
and source =
"^[a-z]+ [a-z ,.'-]+$/"
while Firefox shows source =
"^[a-z]+ [a-z ,.'-]+$\/"
I believe my latest commit here should fix it:
Modifiers weren't being passed to the RegExp object properly, but they should work correctly now.
It works perfectly now.