Skip to main content
Skirby55
Participant
July 8, 2011
Question

cfinput validateAt onSubmit not working

  • July 8, 2011
  • 1 reply
  • 729 views

A bit about the environment:  Laptop running win7(x64), Apache2.2, and CF9.0.1 Developer.

I created a simple login form, just asking for an email address and password, to test out form validation, and it worked flawlessly, so i went on to a much larger project of this:  http://pastie.org/2184920

Coldfusion generates the following javascript when the page is loaded:  http://pastie.org/2184962

Unfortunately, none of the fields get validated with validateAt="onSubmit".  if i set it to "onServer", it all works fine and returns the errors on the page.

Any ideas what might be causing this?

P.S.  Yes, the code creates quite the ugly page.  I removed all HTML formatting for testing purposes.

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 9, 2011

    The first thing one should always do if one encounters "unexpected behaviour" with JavaScript is to check whether there were any JavaScript errors.  This is because JS processing will stop if an error is encountered, which is usually the source of this mismatch in expectations.

    That's the first thing I'd do if I was you.

    And whilst the regexes in your CFINPUT tags are being run by the JS regex engine, the syntax rules still apply, so you're probably gonna want to refer to these docs when you come to fix your problems:

    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0a38f-7ffb.html#WSc3ff6d0ea77859461172e0811cbec0a38f-7fef

    --

    Adam