Jquery Validation


<script src=”js/jquery.validate.min.js” type=”text/javascript”></script>

<script type=”text/javascript”>
$(function(){
$(“#register_form”).validateset({
rules: {
fname: { required: true, maxlength: 64 },
lname: { required: true, maxlength: 64 },
r_users: { required: true, maxlength: 64, remote: “getemailval.php” },
r_emails: { required: true, email: true, maxlength: 32, remote: “getemailval.php” },
r_pass: { required: true, maxlength: 64 },
},
messages: {
fname: { required: “First Name is Required” },
lname: { required: “Last Name is Required” },
r_users: { required: “User Name is Required”, remote: “User Name Allready Exist” },
r_emails:{ required: “Email Id  is Required”, remote: “Email Id Allready Exist” },
r_pass: { required: “Password  is Required” },
}
});
});
</script>

<form name=”register_form” id=”register_form” method=”post” action=”signup_action.php” enctype=”multipart/form-data” target=”_parent” onSubmit=”return validateset();”>
<ul>
<li>First Name <span>*</span> :</li>
<li><input type=”text” value=”” id=”fname” name=”fname”></li>
</ul>
<ul>
<li>Last Name <span>*</span> :</li>
<li><input type=”text” value=”” id=”lname” name=”lname”></li>
</ul>
<ul>
<li>User Name <span>*</span> :</li>
<li><input type=”text” value=”” id=”r_users” name=”r_users” ></li>
</ul>
<ul>
<li>Email Id <span>*</span> :</li>
<li><input type=”text” value=”” id=”r_emails” name=”r_emails” ></li>
</ul>
<ul>
<li>Password <span>*</span> :</li>
<li><input type=”password” value=”” id=”r_pass” name=”r_pass” ></li>
</ul>
<ul>
<li><input type=”submit” name=”send” id=”send” value=”Create Account”></li>
</ul>
</form>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s