How can I set required in input type password feild | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

How can I set required in input type password feild

help me out of month programming https://www.sololearn.com/discuss/346055/?ref=app

4th May 2017, 12:15 PM
Aijaz Ahmed
Aijaz Ahmed - avatar
6 Answers
+ 7
I can set required fields
4th May 2017, 12:20 PM
Aijaz Ahmed
Aijaz Ahmed - avatar
+ 6
Simply: <input type="password" name="pw" required> bear in mind that this is not secure at all. Any user can inspect your code and delete that required and could therefore easily bypass this verification. Consider using a server-side checking as well
4th May 2017, 12:32 PM
CHMD
CHMD - avatar
+ 6
sever side checking what you mean
4th May 2017, 1:15 PM
Aijaz Ahmed
Aijaz Ahmed - avatar
+ 4
Is this a question or tip or.... I really confuse..😥
4th May 2017, 12:31 PM
Calviղ
Calviղ - avatar
+ 4
just add required attribute . The default value of required is true. so <input type="text" required /> is equal to <input type="text" required="true"/>
4th May 2017, 5:26 PM
Bharath
Bharath - avatar
+ 3
Have you tried something like this? <form method="POST" action="/do_action"> <input type="password" name="usr_passw" required="true"> <input type="button" value="click me"> </form>
4th May 2017, 12:30 PM
Thanh Le
Thanh Le - avatar