Jquery IsNumeric with a not condition

18,185

Your call to the function is a little off. It should be jQuery.isNumeric() or $.isNumeric(), so your code would look this:

if(!$.isNumeric($('#Amount').val())) {
   // do something
}
Share:
18,185

Related videos on Youtube

Nate Pet
Author by

Nate Pet

Updated on June 04, 2022

Comments

  • Nate Pet
    Nate Pet almost 2 years

    I am using Jquery to check to see if something isNumeric. How do I check to see if it is not numeric?

        if  (IsNumeric($('#Amount').val())) { .....
    

    I put a ! before IsNumeric but that did not work.