JQuery - Form Validation

Posted on 2011-10-13
Last Modified: 2012-05-12
Is it possible to get an example (not link please) for a one field form JQuery validation, including necessary plugin links?

Just basic as can be saying field is required.

Question by:carsRST
    LVL 81

    Accepted Solution

    with :

    <script src=""></script>
    <script src=""></script>

    test page :

    $(document).ready(function() {

    Open in new window

    <form action="" method="get">
        <input type="email" class="required email" />
        <br />
        <input type="submit" value="Submit" />

    Open in new window

    LVL 17

    Assisted Solution

    Here is validation of different types of form element
    <meta http-equiv="Content-Language" content="en-gb">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Kiran Test</title>
    <script src="" type="text/javascript"></script>
      <script src=""></script>
        rules: {
          email: "required",
          name: "required",
          title: "required",
          checkme: {
            required: function(element){
              return !$("#checkme").is(':checked');
    <form method="POST" id="registerForm" >
           <td><input name="email" type="email"></td>
            <select size="1" value="" name="title">
            <option selected></option>
            <option value="mr">mr</option>
            <option value="mrs">mrs</option>
            <option value="ms">ms</option>
            <option value="miss">miss
             <input name="name">
            <td>Check Me <input name="checkme" type="checkbox" id="checkme"></td>
    <p><input type="submit" value="submit"><input type="reset" value="clear form"> </p>

    Open in new window

    LVL 16

    Author Closing Comment

    Thank you!

    Exactly what I wanted.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now