Copy link to clipboard
Copied
Hello~
I have a bit of a weird problem. I am using validate="regular_expression" with the pattern attribute in one of the <cfinput> tags in a rather long form. There are other required fields, etc., throughout the form. If I leave the "pattern" attribute out of this one <cfinput> tag, everything works correctly and a message box pops up with any errors that are present. If I add in the "pattern" attribute, the form submits with no error checking at all. Has anyone ever run across this before?
Works (minus checking the regular expression):
<cfinput type="text" class="inputArea" size="50" maxlength="50" name="domainMask" value="#local.domainMask#" id="domainMask" message="Please enter a valid domain mask." validate="regular_expression" />
No error checking (including regular expression):
<cfinput type="text" class="inputArea" size="50" maxlength="50" name="domainMask" value="#local.domainMask#" id="domainMask" message="Please enter a valid domain mask." validate="regular_expression" pattern="^((https://){1}(www\.)?[A-Za-z0-9-_]{3,}(.com/){1})$" />
Thanks!
KC
Copy link to clipboard
Copied
Do you get any JS errors?
Can you provide a fully-function, self-contained example that demonstrates what you're seeing (ie: a bare-minimum complete form, and examples of input data that demonstrate it)?
--
Adam