allowing only letters in the input with jquery Mask

0

Is it possible to only allow input letters with the jquery Mask?

I'm using this plugin: JQuery Mask Plugin

    
asked by anonymous 23.01.2017 / 17:06

1 answer

3

$(document).ready(function(){
  $('#letras').mask('SSSS');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.8/jquery.mask.js"></script>

<input type="text" id="letras">

According to documentation , you can use the letter S to specify uppercase and lowercase letters .

'S': {pattern: /[a-zA-Z]/}
    
23.01.2017 / 17:15