Skip to content

Commit

Permalink
Make constraint validation algorithm for minlength attribute match re…
Browse files Browse the repository at this point in the history
…ality

Per http://caniuse.com/#feat=input-minlength ,
only Blink currently implements minlength, and it implements it similar to
maxlength, which means it requires the user to edit the value in order for it
to be considered "too short".
So this commit copies the dirtiness and "last edited by the user" conditions
from maxlength's constraint validation algorithm
into minlength's constraint validation algorithm.

Closes #174.
  • Loading branch information
cvrebert committed Sep 30, 2015
1 parent 5f73843 commit d95b36b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -52524,7 +52524,9 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
<div w-nodev>

<p><strong>Constraint validation</strong>: If an element has a <span>minimum allowed value
length</span>, its <span data-x="concept-fe-value">value</span> is not the empty string, and the
length</span>, its <var>dirty value flag</var> is true, its <span
data-x="concept-fe-value">value</span> was last changed by a user edit (as opposed to a change made
by a script), its <span data-x="concept-fe-value">value</span> is not the empty string, and the
<span>code-unit length</span> of the element's <span data-x="concept-fe-value">value</span> is less
than the element's <span>minimum allowed value length</span>, then the element is <span>suffering
from being too short</span>.</p>
Expand Down

0 comments on commit d95b36b

Please sign in to comment.