<input oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(..*)./g, '$1');" class="form-control" id="phone" name="phone" type="text" placeholder="Phone"/>
How about this? /(7|8|9)d{9}/
It starts by either looking for 7 or 8 or 9, and then followed by 9 digits.