Open jabcreations opened 10 months ago
HTML: <input id="test" minlength="4" type="text" value="123" />
<input id="test" minlength="4" type="text" value="123" />
JavaScript: document.getElementById('test').validity.tooShort
document.getElementById('test').validity.tooShort
Simple: the value here has a length of three, the minlength attribute species four characters while validity.tooShort incorrectly returns false when it should be true.
minlength
validity.tooShort
false
true
It should be a simple fix for someone familiar with the code.
HTML:
<input id="test" minlength="4" type="text" value="123" />
JavaScript:
document.getElementById('test').validity.tooShort
Simple: the value here has a length of three, the
minlength
attribute species four characters whilevalidity.tooShort
incorrectly returnsfalse
when it should betrue
.It should be a simple fix for someone familiar with the code.