Friday, January 1, 2010

[jQuery] problem with validation plugin using the remote option

I'm having a problem with the validation plugin. Any time I try to
use the remote option, I get the same javascript error, regardless of
my configuration settings. The error is this:

Error: this.settings.messages[element.name] is undefined
Source File: http://localhost/toldya6/liquid/scripts/js/jquery/validate.js
Line: 16

Here's the code:

$().ready(function() {
$('#frm_user').validate({
errorContainer: "#invalid",
rules: {
password: "required",
confirm_password: { equalTo: "#password" },
email: {
remote: 'check-email.php'
}
}
});
});

my check-email.php file does only this:

<?php echo 'true' ?>

my form looks like this:

<form id="frm_user" name="frm_user" method="post" action="<?php echo
$_SERVER['PHP_SELF'] ?>" class="liquidform">
<fieldset class="overlay">
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td><ol>
<li class="last">
<label for="email">Your Email <em>*</em></label>
<input type="text" id="email" name="email"
value="<?php echo $user->email ?>" maxlength="80"
class="{required:true, email:true}">
</li>
<li class="last">
<label for="btn_submit"></label>
<input type="image" id="btn_submit"
name="btn_submit" src="../images/buttons/next_step_on.gif" />
</li>
</ol></td>
</tr>
</table>
</fieldset>
</form>

the error also appears if I remove the inline class="{required:true,
email:true}" from the email field.

Help!

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate