0 Replies Latest reply on Dec 14, 2007 2:40 AM by baitband

    cfform regex validation message

      I have a problem returning my message text when validating a cfinput field against a regular expression on CF8, as follows:

      <cfinput type="text" name="AddrTitle" id="AddrTitle" size="50" maxlength="250" value="#AddrTitle#" validate="regular_expression" pattern="[\w_-]*" validateat="onsubmit,onserver" message="Use only alphanumeric characters or - (dash) or _ (underscore) only for the address bar title" />

      Instead of a javascript pop-up message (which I would expect), I get the server response using the default CF error response (The value entered in the field ADDRTITLE is not correctly formatted for the pattern [\w_-]*.)

      In the same form, a date field validates just fine and displays my message text properly, both in a javascript message box or server side, when I have disabled javascript, so the cfform.js file is available (I have checked this though the address bar too).

      Does anyone know why the regex validated field isn't displaying my custom message?