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

Unified Diff: Source/core/html/HTMLTextAreaElement.h

Issue 435753003: Implement minlength for <input> and <textarea>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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/HTMLTextAreaElement.h
diff --git a/Source/core/html/HTMLTextAreaElement.h b/Source/core/html/HTMLTextAreaElement.h
index b5f9ffb4b5f7320263d27d014696545f513cf86c..171081d458d165df485c4087cf13458175b98ce7 100644
--- a/Source/core/html/HTMLTextAreaElement.h
+++ b/Source/core/html/HTMLTextAreaElement.h
@@ -47,7 +47,9 @@ public:
void setDefaultValue(const String&);
int textLength() const { return value().length(); }
int maxLength() const;
+ int minLength() const;
void setMaxLength(int, ExceptionState&);
+ void setMinLength(int, ExceptionState&);
String suggestedValue() const;
void setSuggestedValue(const String&);
@@ -56,6 +58,7 @@ public:
virtual String validationMessage() const OVERRIDE;
virtual bool valueMissing() const OVERRIDE;
virtual bool tooLong() const OVERRIDE;
+ virtual bool tooShort() const OVERRIDE;
bool isValidValue(const String&) const;
void setCols(int);
@@ -122,6 +125,7 @@ private:
bool valueMissing(const String& value) const { return isRequiredFormControl() && !isDisabledOrReadOnly() && value.isEmpty(); }
bool tooLong(const String&, NeedsToCheckDirtyFlag) const;
+ bool tooShort(const String&, NeedsToCheckDirtyFlag) const;
int m_rows;
int m_cols;

Powered by Google App Engine
This is Rietveld 408576698