diff --git a/src/AngularPublic.js b/src/AngularPublic.js
index e97723ef946d..fce7d9449ba8 100644
--- a/src/AngularPublic.js
+++ b/src/AngularPublic.js
@@ -45,6 +45,8 @@
     ngChangeDirective,
     requiredDirective,
     requiredDirective,
+    minlengthDirective,
+    maxlengthDirective,
     ngValueDirective,
     ngModelOptionsDirective,
     ngAttributeAliasDirectives,
@@ -184,6 +186,8 @@ function publishExternalAPI(angular){
             ngChange: ngChangeDirective,
             required: requiredDirective,
             ngRequired: requiredDirective,
+            ngMinlength: minlengthDirective,
+            ngMaxlength: maxlengthDirective,
             ngValue: ngValueDirective,
             ngModelOptions: ngModelOptionsDirective
         }).
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index e16c10e4e0a2..5faaec287a3a 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -1002,22 +1002,6 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
       };
     }
   }
-
-  // min length validator
-  if (attr.ngMinlength) {
-    var minlength = int(attr.ngMinlength);
-    ctrl.$validators.minlength = function(value) {
-      return ctrl.$isEmpty(value) || value.length >= minlength;
-    };
-  }
-
-  // max length validator
-  if (attr.ngMaxlength) {
-    var maxlength = int(attr.ngMaxlength);
-    ctrl.$validators.maxlength = function(value) {
-      return ctrl.$isEmpty(value) || value.length <= maxlength;
-    };
-  }
 }
 
 function weekParser(isoWeek) {
@@ -2139,6 +2123,33 @@ var requiredDirective = function() {
 };
 
 
+var maxlengthDirective = function() {
+  return {
+    require: '?ngModel',
+    link: function(scope, elm, attr, ctrl) {
+      if (!ctrl) return;
+      var maxlength = int(attr.ngMaxlength);
+      ctrl.$validators.maxlength = function(value) {
+        return ctrl.$isEmpty(value) || value.length <= maxlength;
+      };
+    }
+  };
+};
+
+var minlengthDirective = function() {
+  return {
+    require: '?ngModel',
+    link: function(scope, elm, attr, ctrl) {
+      if (!ctrl) return;
+      var minlength = int(attr.ngMinlength);
+      ctrl.$validators.minlength = function(value) {
+        return ctrl.$isEmpty(value) || value.length >= minlength;
+      };
+    }
+  };
+};
+
+
 /**
  * @ngdoc directive
  * @name ngList