How to restrict an input to a variable amount of numbers only with PrimeFaces inputMask element

后端 未结 5 2471
Happy的楠姐
Happy的楠姐 2021-02-20 05:35

I need to define something similar to this regex:

[0-9]{1, 5}

On a PrimeFaces element:



        
5条回答
  •  庸人自扰
    2021-02-20 06:03

    just try this :

    
            
    
    

    maxlength : limit the number of caracters to 5 max regEx : only authorize decimal caracter on key press

    nb:

提交回复
热议问题