0

How I can limit the use of words in a name field in creating a Form? Which tag is used?

<html> <head> <title>form</title> </head> <body> <form> <input type="text" name="username" value="username" required/> </body> </html>

8th Feb 2021, 7:42 AM
Bittu
Bittu - avatar
3 Respostas
+ 1
Use the "max" attribute. 👍
8th Feb 2021, 8:04 AM
Nafis Sadik Nibir
Nafis Sadik Nibir - avatar
+ 1
Limit the use of words meaning filter inappropriate words? or limit length of input? for the latter, use `maxlength` attribute. For the former, I think you need to describe clearly what "limit words" mean. <input type="text" name="username" maxlength="10" value="username" required />
8th Feb 2021, 8:57 AM
Ipang
0
Thank you to all this was helpful
9th Feb 2021, 7:58 AM
Bittu
Bittu - avatar