Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 700801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:32:18+00:00 2026-05-14T03:32:18+00:00

I have the following code to enable validation work: $(document).ready(function() { $(#eventForm).validate({ rules: {

  • 0

I have the following code to enable validation work:

$(document).ready(function() {

    $("#eventForm").validate({
        rules: {
            startDate: "required",
            startTime: "required",
            endDate: {
                required: function (element) {
                    var endTimeValue = $('#endTime').val();
                    return (endTimeValue != null && endTimeValue != '');
                }
            },
            endTime: {
                required: function (element) {
                    var endDateValue = $('#endDate').val();
                    return (endDateValue != null && endDateValue != '');
                }
            }
        },
        messages: {
            startDate: "Please enter event local start date",
            startTime: "Please enter event local start time"
        },
        errorPlacement: function (error, element) {
            error.appendTo(element.parent().next());
        },
        submitHandler: function (form) {
            var options = {
                dataType: 'json',
                success: eventCreationSuccess,
                error: eventCreationError
            };
            alert('submit');
            //$(form).ajaxSubmit(options);
        }
    });
 });

But validation plugin doesn’t catch submit – default submit is executed.

jQuery and validation plugin scripts are imported.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:32:19+00:00Added an answer on May 14, 2026 at 3:32 am

    You need to give your form an id of eventForm

    <form name="eventForm" id="eventForm" method="post">
    

    You given it a name, but not an id. Also, the sample you provided from pastebin.com looks incomplete, it is missing the form controls.

    Here is a super basic sample:

    <form name="eventForm" method="post" id="eventForm">
        <input type="text" name="name" id="name" class="required"/>
        <input type="submit" class="submit" value="Submit"/>
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 502k
  • Answers 502k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Why does BulkToolShellViewModel have its own PropertyChanged event along with… May 16, 2026 at 2:44 pm
  • Editorial Team
    Editorial Team added an answer Take a look at: http://code.google.com/p/iphone-photo-picker/ This was done by the… May 16, 2026 at 2:44 pm
  • Editorial Team
    Editorial Team added an answer It looks like you can do this in NetBeans 6.9. May 16, 2026 at 2:44 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Are forms that use the POST method required to have CSRF protection? I'm following
I have the following models: class Merchant acts_as_authentic has_one :store accepts_nested_attributes_for :store end class
The following .NET 3.5 code, placed in an aspx file, will trigger a JavaScript
I have trouble to find the kernel API to enable some qdisc policies tc
I have configuired PHP 5.3 on IIS 7 using the following instructions: http://www.php.net/manual/en/install.windows.iis7.php and
I'm running into a problem where I have a simple add/edit form and using
I am getting the following error when I post back a page from the
I have a web page with various controls. Two of them are dropdownlists. The
Has anyone managed to get a custom IMessageInterpolator working to enable customisation of error
I'm not the first to have these issues, and will list some reference posts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.