HI,
Im trying to validate an email field dinamically using jquery.validate here.
The field i'm speaking about is "Email" ("Registro" form).
any idea?
Regards
Javi
HI,
Im trying to validate an email field dinamically using jquery.validate here.
The field i'm speaking about is "Email" ("Registro" form).
any idea?
Regards
Javi
Your script order is reversed, include juery before any plugins, like this:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js"></script>
Also since I don't see any conflicts, I'd go ahead and move to jQuery 1.4 to get the latest benefits.
I failed inside the rule..This works ok:
<script type="text/javascript">
$.validator.setDefaults({
submitHandler: function() { alert("submitted!"); }
});
$().ready(function() {
// validate signup form on keyup and submit
$("#jander").validate({
rules: {
'sfApplyApply[email]': {
required: true,
email: true
}
},
messages: {
'sfApplyApply[email]': "Please enter an email",
}
});
});
</script>