Is integer by regex - Node.js Number

Node.js examples for Number:Int

Description

Is integer by regex

Demo Code

       integer : {//from  ww  w  . j  a v  a  2 s  . c  om
          validator : function(value) { 
              return /^[+]?[-]?[1-9]+\d*$/i.test(value); 
          }, 
          message : '' 
       },

Related Tutorials