Having a hard time enforcing maximum field lengths in Contour. According to various RegEx sources, it seems I should be able to put this in the RegEx value for any Contour field to allow a max length of 100 characters (and minimum of none, or empty):
^.{0,100}$
However, it seems to only work sporadically. I added a few of those to a form, tested it, seemed to work. Then got 3 emails today from folks complaining they were well within character limits but still getting validation messages. I tried the form again, and now am getting sporadic results also. (Far less than 100 characters but still returning the validation error.)
Maybe my RegEx code is incorrect? Or (hopefully not) any differences across browsers?
Also, the reason I'm adding these is Contour doesn't give any indication that a record has *not* been added to the database (like when field size limits prevented record insertion). Luckily we included an email step in our workflow or those form submissions would have been lost completely.
How to restrict field length using RegEx?
Having a hard time enforcing maximum field lengths in Contour. According to various RegEx sources, it seems I should be able to put this in the RegEx value for any Contour field to allow a max length of 100 characters (and minimum of none, or empty):
However, it seems to only work sporadically. I added a few of those to a form, tested it, seemed to work. Then got 3 emails today from folks complaining they were well within character limits but still getting validation messages. I tried the form again, and now am getting sporadic results also. (Far less than 100 characters but still returning the validation error.)
Maybe my RegEx code is incorrect? Or (hopefully not) any differences across browsers?
Also, the reason I'm adding these is Contour doesn't give any indication that a record has *not* been added to the database (like when field size limits prevented record insertion). Luckily we included an email step in our workflow or those form submissions would have been lost completely.
Hi - Any solution to this? I need to restrict some textbox input as well.
I was able to get it to work with e.g. ^[\s\S]{0,100}$
is working on a reply...