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
Post a Comment