ng-minlength, ng-maxlength Validation using Angular Example

Today, We want to share with you ng-minlength, ng-maxlength Validation using Angular Example.In this post we will show you Angularjs minimum length and maximum length validation example, hear for How to use ng-minlength / maxlength properties in angularjs with example we will give you demo and example for implement.In this post, we will learn about minlength and maxlength validation in angularjs with an example.

ng-minlength, ng-maxlength Validation using Angular Example

There are the Following The simple About angularjs input min max validation Full Information With Example and source code.

As I will cover this Post with live Working example to develop Angularjs min, max length validation example, so the angularjs form validation is used for this example is following below.

AngularJS ng-minlength, ng-maxlength Validation Example

Angular is a platform for building mobile & desktop web Based user friendly and light weight applications.Angular,It’s TypeScript-based open-source Angularjs web application framework.


<!DOCTYPE html>
<title>AngularJs Example to Use Both ng-minlength, ng-maxlength for Form Validation AngularJS Tutorials, Demo with Example -</title>
<script src=""></script>
<script type="text/javascript">
var webApplication = angular.module('ngminmaxlengthRootApplication', []);
webApplication.controller('ngminmaxlengthController', function ($scope) {
$scope.sendForm = function () {
$scope.message = "Form Validated";
<div ng-app="ngminmaxlengthRootApplication" ng-controller="ngminmaxlengthController">
<h3>AngularJs Example to Use Both ng-minlength, ng-maxlength</h3>
<form name="memberForm" novalidate ng-submit="memberForm.$valid &&sendForm()">
Pin Code: <input type="text" name="pincode" ng-model="txtpin" ng-minlength="3" ng-maxlength="5" required />
<span style="color:#c60000" ng-show="memberForm.pincode.$error.required"> Required! </span>
<span style="color:#c60000" ng-show="memberForm.pincode.$dirty&&memberForm.pincode.$error.minlength"> Minimum 3 Characters Required </span>
<span style="color:#c60000" ng-show="memberForm.pincode.$dirty&&memberForm.pincode.$error.maxlength"> Maximum 5 Characters Allowed </span>
<hr /><hr />
<button type="submit">Submit Form</button><hr /><hr />

Web Programming Tutorials Example with Demo

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about angular 6 input max length.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Related FAQ

Here are some more FAQ related to this Article:

  1.   ng-maxlength using Angular Example
  2.   ng-pattern Email Validation using Angular Example
  3.   how to check a plugin is activated or not in wordpress
  4.   ng-minlength using Angular Example
  5.   Angularjs dual listbox Tutorial Example with demo
  6.   PHP Technical Interview Questions and Answers
  7.   paypal express checkout woocommerce Integration
  8.   Paypal Payment Gateway Integration using Java
  9.   Laravel 6.2 Create Custom Helper Tutorial with Example
  10.   Ajax Upload Multiple Images without form submit