Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFinput pattern problem

Guest
Oct 20, 2010 Oct 20, 2010

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

570
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 22, 2010 Oct 22, 2010
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources