I'm using Field Validation and I've created multiple regex rules so the user gets a different message depending on the type of data they enter to give them a better idea of what they need to change. The problem is that Field Validation is only noticing one rule and ignoring the others so they're no longer triggered at all.

Just for reference I've also posted a related issue to the Field Validation issue queue which basically makes this functionality better in Field Validation by displaying the multiple error messages on screen at the same time so you don't have to submit, get a an error, submit, get another error for same field.... again and again.

Comments

attiks’s picture

Status: Active » Postponed

Let's wait till #1804912: Allow multiple rules to be matched and displayed at once. is resolved/closed before changing clientside_validation.

SeanBannister’s picture

I think there is some work that can be done here that will be relevant and fix the bug side of this issue.

For example currently I have two regex, one fires if the field starts with "www." the other if it starts with "http://" so only one will ever be fired at once. However I guess Clientside Validation only loads one of them as I get the error for "http://" but when I enter "www." I get nothing. This ability to handle multiple validation rules is still relevant whether or not my feature request in Field Validation happens.

SeanBannister’s picture

Also more importantly if you add a Field Validation rule to a Link field it actually stops the default URL validation from working.

attiks’s picture

Status: Postponed » Active

Any change you can create a patch to fix his?

SeanBannister’s picture

For sure, I'll add it to the list of things to do, might take me a few tries to get it right :)

cravecode’s picture

Issue summary: View changes

Any plans on a fix for this? I'm attempting to add several regex rules for a single webform element and it looks like only one will work at a time.