Issue with equalTo and Email

15 views
Skip to first unread message

rba...@thunderbay.ca

unread,
May 16, 2013, 9:20:54 AM5/16/13
to valida...@googlegroups.com
Greetings
 
I can't seem to get the equalTo to work on the server side validation. It keeps telling me they do not match.
 
Any ideas.
 
Please advise.
 
Thanks.
 
 
Portion of the XML:
 
<property name="Email" >
  <rule type="required" failureMessage="Please provide an email adress." contexts="User" />
  <rule type="maxLength" failureMessage="Email is too long." contexts="User" >
    <param name="maxLength" value="60" />
  </rule>
  <rule type="email" failureMessage="Please provide a valid email adress." contexts="User" />
</property>
<property name="ConfirmEmail" >
  <rule type="equalTo" failureMessage="Email addresses do not match." contexts="User"  >
    <param name="ConfirmEmail" value="Email" />
  </rule>
</property>
 
HTML Code :
 
<tr>
  <td>Email:</td>
  <td>
    <div id='frmUserDetails_Email_errorloc' ></div>
    <input name="Email" type="text" value="#tmpEmail#" size="60">
  </td>
</tr>
<tr>
  <td>Confirm Email:</td>
  <td>
    <div id='frmUserDetails_ConfirmEmail_errorloc' ></div>
    <input name="ConfirmEmail" type="text" value="#tmpConfirmEmail#" size="60" />
  </td>
</tr>

John Whish

unread,
May 20, 2013, 2:14:57 PM5/20/13
to valida...@googlegroups.com
I think it should be:

<property name="Email" >
  <rule type="required" failureMessage="Please provide an email adress." contexts="User" />
  <rule type="maxLength" failureMessage="Email is too long." contexts="User" >
    <param name="maxLength" value="60" />
  </rule>
  <rule type="email" failureMessage="Please provide a valid email adress." contexts="User" />
</property>
<property name="ConfirmEmail" >
  <rule type="equalTo" failureMessage="Email addresses do not match." contexts="User"  >
    <param name="ComparePropertyName" value="Email" />
  </rule>
</property>


--
You received this message because you are subscribed to the Google Groups "ValidateThis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to validatethis...@googlegroups.com.
To post to this group, send email to valida...@googlegroups.com.
Visit this group at http://groups.google.com/group/validatethis?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

rba...@thunderbay.ca

unread,
May 24, 2013, 11:54:42 AM5/24/13
to valida...@googlegroups.com, john....@googlemail.com
 John
Your are right. I also needed  to restart CF to allow ValidateThis fo pickup the change to the xml.

Thanks John.
Reply all
Reply to author
Forward
0 new messages