Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1022)

Unified Diff: Source/core/html/FormAssociatedElement.cpp

Issue 435753003: Implement minlength for <input> and <textarea>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add layout tests for minlength & maxlength together; fix comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/FormAssociatedElement.cpp
diff --git a/Source/core/html/FormAssociatedElement.cpp b/Source/core/html/FormAssociatedElement.cpp
index c05de2dd44c5c2f36026dd4036b701e2118cea02..0b289f99ee96ed5faf87a16c2761f6e7f943aec6 100644
--- a/Source/core/html/FormAssociatedElement.cpp
+++ b/Source/core/html/FormAssociatedElement.cpp
@@ -239,6 +239,11 @@ bool FormAssociatedElement::tooLong() const
return false;
}
+bool FormAssociatedElement::tooShort() const
+{
+ return false;
+}
+
bool FormAssociatedElement::typeMismatch() const
{
return false;
@@ -247,7 +252,8 @@ bool FormAssociatedElement::typeMismatch() const
bool FormAssociatedElement::valid() const
{
bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow()
- || tooLong() || patternMismatch() || valueMissing() || hasBadInput() || customError();
+ || tooLong() || tooShort() || patternMismatch() || valueMissing() || hasBadInput()
+ || customError();
return !someError;
}

Powered by Google App Engine
This is Rietveld 408576698