Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- regExp = /^((8|+7)[- ]?)?((?d{3})?[- ]?)?[d- ]{7,10}$/;
- if( valnospace.length > 0 && !valnospace.match( regExp ) ) {
- error.type.push('phone');
- regExp = /^((8|+7)[- ]?)?((?d{3})?[- ]?)?[d- ]{7,10}$/;
- if( valnospace.length > 0 && (!valnospace.match( regExp ) || valnospace.match( /^s+$/ ))) {
- error.type.push('phone');
- }
Add Comment
Please, Sign In to add comment