jsf - Not allow special characters and only upper case p:inputText Primefaces -


well, have <p:inputtext> in primefaces, want know how can allow uppercase word , no special characters. ex: renato calhaça = renato calhaca

"renato".touppercase() convert string uppercase.

take @ java.text.normalizer converting (some, not all) accented characters standard.

to disallow lowercase and/or special characters should use validator. simple regex identify special characters [^a-za-z0-9] or special , lowercase characters [^a-z0-9]. validator can modify input using 2 methods indicated above - though may want make sure user knows happening.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -