Маска телефона в поле ввода

<input type="text" id="phone" name="phone" value="" pattern="[\+]\d{1}[\(]\d{3}[\)]\d{3}[\-]\d{2}[\-]\d{2}" minlength="16" maxlength="16" placeholder="+7(___)___-__-__">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/inputmask/4.0.8/jquery.inputmask.bundle.min.js"></script>
<script>
jQuery(document).ready(function($) {
	$('#phone').inputmask('+7(999)999-99-99');
});
</script>