Index: Source/core/html/forms/InputType.cpp |
diff --git a/Source/core/html/forms/InputType.cpp b/Source/core/html/forms/InputType.cpp |
index 27d69d87471e9b92722ef3773c1e1286a022f858..1da08da15942c3c79ef7482c2af50cf136b5cd88 100644 |
--- a/Source/core/html/forms/InputType.cpp |
+++ b/Source/core/html/forms/InputType.cpp |
@@ -239,6 +239,11 @@ bool InputType::tooLong(const String&, HTMLTextFormControlElement::NeedsToCheckD |
return false; |
} |
+bool InputType::tooShort(const String&, HTMLTextFormControlElement::NeedsToCheckDirtyFlag) const |
+{ |
+ return false; |
+} |
+ |
bool InputType::patternMismatch(const String&) const |
{ |
return false; |
@@ -370,6 +375,9 @@ String InputType::validationMessage() const |
if (element().tooLong()) |
return locale().validationMessageTooLongText(value.length(), element().maxLength()); |
+ if (element().tooShort()) |
+ return locale().validationMessageTooShortText(value.length(), element().minLength()); |
+ |
if (!isSteppable()) |
return emptyString(); |
@@ -650,6 +658,11 @@ int InputType::maxLength() const |
return HTMLInputElement::maximumLength; |
} |
+int InputType::minLength() const |
+{ |
+ return 0; |
+} |
+ |
bool InputType::supportsPlaceholder() const |
{ |
return false; |