Answers for "minlength doesn't work for 0"

3

minlenght doesnt work on 0

This is by design. The minlength attribute only validates a field once 
it has been edited by the user. It doesn't validate the field if its 
value hasn't been changed, even if that value doesn't meet the 
constraint. --By: BoltClock on Github

Add "required" to the input tag to force the user to input something -- By: Me
Posted by: Guest on January-03-2020

Browse Popular Code Answers by Language