[Webkit-unassigned] [Bug 263880] New: `minlength` attribute is not always respected

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 30 04:41:20 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=263880

            Bug ID: 263880
           Summary: `minlength` attribute is not always respected
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: pepkin88 at gmail.com
                CC: cdumez at apple.com, wenson_hsieh at apple.com

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/

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231030/c69f0f0d/attachment.htm>


More information about the webkit-unassigned mailing list