Validation For Integer

By Goniey N (Mr. G)

Checks That Given value Is Exactly Integer Or Not...


+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

Parameter : strInteger-Checks Value Using This Variable & Which Is Pass As Argument.

Return : If Given Value Is Integer Then Return True Otherwise Return False True if valid, otherwise false.

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+




function CheckInteger(strInteger)
{
  var objRegex  = /(^-?\d\d*$)/;

  
//Check Here That Given Value Is Integer Or Not....
  
return objRegex.test(strInteger);
}

Validation For Integer  (1067 Views)