Skip to content

Instantly share code, notes, and snippets.

@yoosinpaddy
Created May 4, 2022 14:26
Show Gist options
  • Save yoosinpaddy/84aa53b16721e53883c99e4e34fb1757 to your computer and use it in GitHub Desktop.
Save yoosinpaddy/84aa53b16721e53883c99e4e34fb1757 to your computer and use it in GitHub Desktop.
html phone number validation with country code
<div class="form-group mb-2">
<label class="form-label" for="mobileNo">{{__('phoneNumber')}}</label>
<input required type="text" class="form-control" id="mobileNo" name="phone"
placeholder="{{__('enterPhoneNumber')}}" pattern="\+[0-9]{1,3}[0-9]{9,}"
title="Phone number must start with country code and have at least 10 digits">
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment