How do I add the attr:data-parsley-pattern=""
tag correctly to a input?
I wrote this:
<input type="text" name="serialnr" id="serialnr" data-parsley-pattern="^[a-zA-Z]{4}[ -]?[a-zA-Z]{4}[ -]?[a-zA-Z]{4}[ -]?[a-zA-Z]{4}$">
But this does exactly nothing (No validation takes place at all while the other input are validated correctly). Do I have to add data-parsley-required="true"
? (Which I did but that didn't help).
I tested the regex with https://www.debuggex.com/ so It shouldn't be a typo. What do I miss?
I call parsley only via data-attributes. Does that matter maybe?
Thank you.