Jquery Form Validator.

Code

Jquery Form Validator.

JQuery Form Validator is a featured jQuery plugin that makes it easy to validate user input while keeping your HTML clean from javascript code.
This jQuery plugin makes clientside form validation easy and also offer’s plenty of customization options.The plugin comes with a useful set of validation methods, including URL and email validation etc. This Plugin also Provide default and custum error message.

Form To Validate

<form id="example">
<input type="text" name="username" >
<input type="email" name="email" id="email ">
<input type="email" name="confirm_email" >
<input type="text" name="phone" >
</form>

Add These Scripts In Header File

<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>

Form Validation Code:

jQuery(function() {
jQuery("#example").validate({
rules: {
username: {
required: !0,
minlength: 6,
},
phone: {
required: !0,
phoneUS: !0,
},
email: {
required: !0,
email: !0
},
confirm_email: {
required: !0,
equalTo: "#email"
}
},
messages: {
username: {
required: "Please enter your name",
minlength: "Your username must be at least 6 characters long"
},
phone: {
required: "Please enter Phone",
phoneUS: "Please enter valid Us Phone"
},
email: {
required: "Please enter a valid email address"
},
confirm_email: {
required: "Please enter email address",
equalTo: "Please enter a same email address"
}
},
submitHandler: function(e) {
e.submit()
}
})
});

Output on submit

Shiv kumawat

Executive Director & CEO

"Shiv kumawat is the Executive Director and CEO of Eoxys It Solution LLP and the strategic mind behind the company"s growth. His expertise in operational efficiency and team leadership empowers his colleagues to excel and innovate.”

Latest Posts

The Future of Work: How AI and Automation Are Reshaping Careers in 2026

  The Future of Work: How AI and Automation Are Reshaping Careers in 2026 A New Era for Careers and…

Shafeeq Khan
December 26, 2025

The Future Is Now: Top Tech and AI Trends Defining 2026

  The Future Is Now: Top Tech and AI Trends Defining 2026 The Tech Revolution of 2026 2026 is set…

Shafeeq Khan
December 24, 2025

Conversational AI in ECommerce: The Next Era of Online Shopping in 2025

  Conversational AI in ECommerce: The Next Era of Online Shopping in 2025 Welcome to the AIFirst Online Storefront By…

Shafeeq Khan
November 28, 2025
, ,

Leave a Reply

Your email address will not be published. Required fields are marked *