I am new to jQuery validation but have tried a number of things and none work.
Issue trying to get an e-mail to validate.
This ColdFusion code works great:
<li>
<label>Accounts Email</label>
<input name="AccountsEmail" id="AccountsEmail" type="email" maxlength="100" size="35" value="#Licencee.getaccountsemail()#" />
<cfif len(licencee.getaccountsemail()) GT 0>
<a href="mailto:#Licencee.getaccountsemail()#" class="uk-icon-envelope-o"></a>
</cfif>
</li>
<li></li>
The above code puts a symbol which is a link when there is an e-mail address, but we want to test a correctly formatted e-mail address has been entered.
<script>
$("#licenceeForm").validate();
</script>
This tests the address great.
This issue we have is changing the error message. I just want to change the field to red no message just do not let the user out unless the e-mail is correctly formatted OR blank.
I tried this:
$( "#licenceeForm" ).validate({
rules: {
AccountsEmail: {
required: false,
email: true
}
}
});
but that resulted in no difference
I have tried:
jQuery.extend(jQuery.validator.messages, {
required: "This field is required.",
remote: "Please fix this field.",
email: "Inc.",
min: jQuery.validator.format("Please enter a value greater than or equal to {0}.")
});
This changed the message but it was still a message and the message changes the layouts and the resultant screen does not look good.