Closed nilshoerrmann closed 13 years ago
It should only be highlighting the fields that contain errors (PHP returns a JSON object that contains the individual bad entries, jQuery does the visual hinting), but I think this problem is actually do to the fact that I didn't escape my backslashes in the rule presets. Since the backslashes aren't escaped, javascript doesn't insert them into the validation rule input, resulting in a borked pattern. When it highlights all the subfields in a column, I'm 99% sure that it's due to a bad regex pattern.
If you paste the following number
pattern (copied from the Text Input field) in your subfield's validation rule input, does it work?
/^-?(?:\d+(?:\.\d+)?|\.\d+)$/i
I fixed (added) the escaped backslashes in the rule presets this morning, so that fix will be in the next commit.
This should be resolved as of 2.0dev6
. Thanks, Nils!
When entering wrong data in a textfield with a validation rule – like
number
– the field highlights all textfields in that column. I'd expect that it only highlights the ones that actually contain errors.