WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
263880
`minlength` attribute is not always respected
https://bugs.webkit.org/show_bug.cgi?id=263880
Summary
`minlength` attribute is not always respected
Marek Pepke
Reported
2023-10-30 04:41:20 PDT
The first input (a keystroke, a paste) in the textarea element doesn't check, if the length of the textarea's value is less than `minlength`. So if a textarea field is required an has set a minlength (5, for example), it can be valid with only a one character entered. Moreover, I found out, that if the value of a field (textarea or input) is set by JS, the `minlength` is never checked. So the following element is always valid: <input name="asd" minlength="5" oninput="this.value = this.value"> Test page:
https://jsfiddle.net/pepkin88/eh3voLpg/19/
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-11-06 03:42:16 PST
<
rdar://problem/117992589
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug