My jQery code is:
$(document).ready(function(){
$('#StudentRegisterForm').validate({
rules: {
email: {
required:true,
email:true
}
}
});
});
and in my form email:
<td><?php echo $form->input('email',array('class required email')); ?></td>
The problem is jquery validate plugin works on the input fields attribute 'name' but cakephp names it as data[Student][email]
. If I use this name in jquery its throwing an error. If I rename the field in cakephp the email value is not passed to the database. Is there any other round about way? Kindly help