Simple Validation Rule between a tickbox list and a text field not accepting regex


Matrix Version:

I am trying to make a text field compulsory if a certain tickbox was checked in a different field. However, the simple validation does appear to work with tickbox fields. When trying it on a text field it works, radio buttons work as well.

Is there a special way of entering the regex for tickbox fields?

Below is a screenshot of what I believe should work, but fails when testing the form.

(Tbaatar) #2

If you are trying to validate the value of tickbox (checkbox) then the value won’t be [1] for a tick it will be [0] and unticked value is just empty.


Thank you for your input.

There are several tickboxes and their value gets automatically set - the first one is value=“0”, the second is value=“1” …

In the screenshot above, I want to check for the tickbox with value=“1” to be checked. It is getting passed as such in the browser. However, it does not seem to have any effect in Matrix.

Has someone used the custom form in Matrix with such a validation before? It seems that the “Tickbox list” is the odd one out…

(Chris Horikx) #4

I am also having this issue, I don’t know if the regex is working at all in the simple validation rules on v:

I have tried

/^$/ |^$| /^.*$/ |^.*$| \d /\d/ |\d| \w /\w/ |\w|

Nothing seems to return true in the regex