Click here to Skip to main content
15,887,485 members

Comments by Member 13951173 (Top 9 by date)

Member 13951173 28-Aug-18 2:48am View    
Thank you so much, It works...
Member 13951173 26-Aug-18 22:11pm View    
This is what I have search and try https://jsfiddle.net/da90nt3c/49/

Like in the text box only:
+60123456789 //true
0123456789 // true
++012345678 //false
012544++++516 // false

Like it just only allow user insert the plus once. But the plus can be optional. But can't have more than one plus
Member 13951173 23-Aug-18 3:34am View    
Means I just replace the * to ? only
Member 13951173 21-Aug-18 3:28am View    
Means like this????


jQuery(function () {
$("#hpno").keyup(function () {
var VAL = this.value;

var phone = new RegExp(/^\+?[0-9]+$/);

if (phone.test(VAL)) {
alert('Great, you entered Phone Num');
}
});
});
Member 13951173 20-Aug-18 21:24pm View    
I have try both codes in my coding the first one it can't insert + character an the second example that you gave everything won't allow even numbers....:(