Javascript code for validating phone number