How to create password length validation in HTML?

In HTML tiny Code to set password length validation is very simple example with jquery validate Form Validation.

In the HTML input tag there is validating by minlength by 7 digit. In the following tiny best example you can not enter less than 7 digit in user password HTML field.

html password length validation

See tiny and easy example following:
index.html

<!DOCTYPE html>
<html>
<body>
<form>
<h2>Employee Login Form</h2>
  Username : 
  <input type="text" />
  
  User Password : 
  <input type="password" minlength="7" />

  <input type="submit" value="Submit" />
  <input type="reset" value="Reset" />
</form>

</body>
</html>

Also Read: Validate Email Password Using jQuery