<script src="/js/jquery.inputmask.js" type="text/javascript"></script>
<input id="phone" type="text" class="required phone" name="phone">
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#phone").inputmask("99-9999999");
});
</script>
jQuery(function($){
$("#phone").mask("+7 (999) 999-9999");
});