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

  • SEARCH
  • Home
  • 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 8128977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:07:04+00:00 2026-06-06T08:07:04+00:00

I am trying to do some additional checks and formatting on certain fields of

  • 0

I am trying to do some additional checks and formatting on certain fields of my form before it is submitted. Hence I used the bassistance jquery validation plugin. It works well as it displays all the manadatory error messages properly, however as soon as I supply the necessary values, the form simply submits. At this point I am not even sure if submitHandler is even triggered. Any ideas?

Form html: http://jsfiddle.net/7PAZU/

$(function() {
    $("#commentForm").validate({
        rules: {
            bill_first_name: {
                required: true
            },
            bill_last_name: {
                required: true
            },
            email: {
                required: true,
                email: true
            },
            Phone: {
                required: true,
                number: true
            },

            bill_address_one: {
                required: true
            },
            bill_city: {
                required: true
            },
            bill_state_or_province: {
                required: true
            },
            charge_total: {
                required: true,
                float: true
            },
        },
        messages: {
            bill_first_name: {
                required: "Please put in First Name"
            },
            bill_last_name: {
                required: "Please put in last Name"
            },
            email: {
                required: "Please enter a valid email"
            },
            phone: {
                required: "Please enter a valid Phone Number"

            },

            bill_address_one: {
                required: "Please put in Address"
            },
            bill_city: {
                required: "Please put in  City"
            },
            bill_state_or_province: {
                required: "Please put in state"
            },
            charge_total: {
                required: "Please put Amount In Whole number such as 10.00",
                number: "Please put in Amount In Whole number such as 10.00"
            },
        },
        submitHandler: function(frm) {
            $("#charge_total").val(parseFloat($("#charge_total").val()).toFixed(2));
            alert("Dukhche Na");
            return false;
        }
    });
})​
  • 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-06-06T08:07:05+00:00Added an answer on June 6, 2026 at 8:07 am

    Your code is failing because you are using a validation rule that does not exist.

    charge_total: {
                    required: true,
                    float: true // there's no validator named `float`
                } // Comma removed here
    

    But there is no validator named float in that plugin. Remove that and it will work fine. You can create a custom float validator if you want.

    Working Fiddle

    Check list of available rules here http://docs.jquery.com/Plugins/Validation#Validator

    How did I find this?

    I checked the console and found this error being thrown

    Uncaught TypeError: Cannot call method 'call' of undefined 
    

    From the following line inside plugin source file

    var result = $.validator.methods[method]
          .call( this, element.value.replace(/\r/g, ""), element, rule.parameters );
    

    Meaning $.validator.methods[method] is undefined which proves that you are using a validator that does not exist.

    So I Checked available validation methods list and your rules and found you are using float rule which is not available.

    So JS is throwing this error and stopping execution, so your submit handler is not being called and form is being submitted(Which is the default behavior unless you prevent that using JS).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using mongoose (on node) and I'm trying to add some additional fields to
I am trying to add some additional logic to the 'Promoted to front page'
I'm trying to add some additional key/value pairs to an NSMutableDictionary, using: Tag *tag1
I'm trying to store some additional data along with the standard error message in
I'm trying to modify all links on a page so they perform some additional
I'm tring to create form validation unit that, in addition to regular tests checks
I'm trying to inject some additional markup in the response but its not outputting
Recently I was trying some practice programs in python and I came across this
I am trying some way to optimize following sql statement: exe_sql DELETE FROM tblEvent_type
I have been trying some programs in the C Language and come across to

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.