JS Common mobile phone number ZIP code number regular verification
*/
Phone number Verification
function Istelephone (str)
{
RegExp =/^[0-9]+ (-[0-9]+) {1,2}$/;
return Regexp.test (str);
}
ZIP Code Verification
function Ispostcode (str)
{
RegExp =/^[0-9]{6,6}$/;
return Regexp.test (str);
}
Mobile Verification
function IsMobile (str)
{
RegExp =/^[0-9]{11,11}$/;
return Regexp.test (str);
}
Digital verification
function Isidnumber (str)
{
REGEXP1 =/^[0-9]{17,17}[0-9xx]$/;
REGEXP2 =/^[0-9]{15,15}$/;
Return (Regexp1.test (str) | | regexp2.test (str);
}
Function Isnum (argvalue)
{
var flag1=false;
var Comps Tutorial tr= " -1234567890";
var Length2=argvalue.length;
for (var iindex=0;iindex<length2;iindex++)
{
var temp1=compstr.indexof ( Argvalue.charat (Iindex));
if (temp1==-1)
{
flag1=false;
break; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP
}
else
{
flag1=true;
}
}
return Flag1;
}
Remove space
Function trim (info)
{
return info.replace (^s*) | ( s*$)/g, "");
}