My pattern currently allows letters and does not allow spaces and numbers, intentionally. However, I would like to allow characters such as !@#$%^&*()_+=-[]|}{;'”:,./?>< for my pattern and input type. How would I doe this?
I tried searching all over the internet and found lots of solutions but none of them worked for me.
Here is my code:
<code><html>
<body>
<form method="get">
<input type="number" min="0" max="150" name="Age"/>
<input type="text" name="Name" pattern="[A-Za-z]+"/>
<input type="submit" value="Submit"/>
</form>
</body>
</html>
</code>
<code><html>
<body>
<form method="get">
<input type="number" min="0" max="150" name="Age"/>
<input type="text" name="Name" pattern="[A-Za-z]+"/>
<input type="submit" value="Submit"/>
</form>
</body>
</html>
</code>
<html>
<body>
<form method="get">
<input type="number" min="0" max="150" name="Age"/>
<input type="text" name="Name" pattern="[A-Za-z]+"/>
<input type="submit" value="Submit"/>
</form>
</body>
</html>
New contributor
Epic Things ئېپوس is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1