I am trying to validate an input parameter of a form with a regular expression but encounter and error in the dhtmlform.js. I am very new to this and was hoping someone could help me understand where I am going wrong…
The regular expression works great until I add the comma. I am trying to exclude 4 characters from the input including a comma. I have tried escaping the comma with a backslash with no luck as well.
error:
line 613 in dhtmlxform.js
invalid range in character class
[Break On This Error]
Thanks for the code! The inline match seems to fix the issue with the comma, but I still have an issue where the validate:function(value) doesn’t seem to be happy with the return type.
if I do validate:false it evaluates correctly, but when the value.match() returns false, validate acts as if I passed true. It there something that causes it to be treated as a string?