Search
 
SCRIPT & CODE EXAMPLE
 

PHP

number validation in jquery

$( "#myform" ).validate({
  rules: {
    field: {
      required: true,
      number: true
    }
  }
});
Comment

number validation in jquery

// Restricts input for the set of matched elements to the given inputFilter function.
(function($) {
  $.fn.inputFilter = function(inputFilter) {
    return this.on("input keydown keyup mousedown mouseup select contextmenu drop", function() {
      if (inputFilter(this.value)) {
        this.oldValue = this.value;
        this.oldSelectionStart = this.selectionStart;
        this.oldSelectionEnd = this.selectionEnd;
      } else if (this.hasOwnProperty("oldValue")) {
        this.value = this.oldValue;
        this.setSelectionRange(this.oldSelectionStart, this.oldSelectionEnd);
      } else {
        this.value = "";
      }
    });
  };
}(jQuery));
Comment

PREVIOUS NEXT
Code Example
Php :: wordpress my account url 
Php :: php extract zip 
Php :: homebrew switch php 
Php :: string date less than now php 
Php :: php check regular string 
Php :: Internal error: xmlSchemaXPathProcessHistory, The state object to be removed is not the first in the list. 
Php :: laravel random column with limit 
Php :: laravel get host with http 
Php :: laravel access controller method from another controller 
Php :: get all post meta 
Php :: $posts- links() laravel design error 
Php :: Zend Framework 2 in a ZF1 project 
Php :: how to remove jstream package 
Php :: convert 1 digit to five digits laravel 
Php :: php detect mobile 
Php :: age php datetime 
Php :: zend redirect to url 
Php :: php json_decode 
Php :: laravel install production 
Php :: send sms by php diafaan 
Php :: laravel with trashed specific 
Php :: install symfony ubuntu 
Php :: check php version linux terminal 
Php :: remove special character in php 
Php :: how to insert if php in html 
Php :: wordpress loop 
Php :: php form get 
Php :: wordpress do shortcode 
Php :: php get php.ini location from termina 
Php :: php get all values from associative array 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =