I am trying to use jquery validator in a cakephp project.There is probem with jquery
I think,something wrong with selector id of my form..I can not even alert any message inside.
I am completely a fresher.
I used following code
$(document).ready(function(){ $('#UserQuickCompanyRegisterForm').validate({
rules: {
"data['User']['email']": {
required: true,
email: true
}
}
}); });
and my form is like this.
echo $form->create('User', array('action' => 'quick_company_register','inputDefaults'=> array('label'=>false)));
and it outputs somthing like below.
<form id="UserQuickCompanyRegisterForm" accept-charset="utf-8" method="post" action="/cityportal/index.php/users/quick_company_register" novalidate="novalidate">.
what i am doing wrong…thanks in advance
its solved.I was making mistake with element id.Instead of id i used name attrbute.”Silly me”.After a ;ong fat burning hour i got thit following code wrking