3
I have an expression on a input
, using pattern
, that has some rules, among them: Accept uppercase letters, lowercase, minimum of 5 characters, do not accept special characters (only accept the -).
pattern="^[A-Za-zÀ-ú0-9., -]{5,}"
I’d like to make him accept the character as well +
(plus).
Go on down mine input
:
<label for="razao-social-novo">Razão Social:</label>
<input type="text" placeholder="Não são permitidos caracteres especiais" pattern="^[A-Za-zÀ-ú0-9., -]{5,}" required />
Just an addendum here. I was indicated two great websites to perform tests in our created regex: https://regexr.com/ (this I joined and it’s really good). https://regex101.com/ (this one they said is very good too).
– Gato de Schrödinger