I'm doing some easy web application to practice my skill.
I'm using a regex to validate my phone input like this,
var reg = /^[\s()+-]*([0-9][\s()+-]*){6,20}$/;
if(!reg.test($('#input-phone').val())){
alert('error');
}
It works normally but it can't be empty. I don't know how to modify this to be able to reject empty field.