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.

Read Also:  ng-pattern Email Validation using Angular Example

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 :

Read Also:  paypal express checkout woocommerce Integration


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. Read Also:  UI Grid Filtering using Angular Example
  2. Read Also:  How To Add Flash Messages in Laravel 6 Session?
  3. Read Also:  PHP Stripe API ACH Payments using stripe.js
  4. Read Also:  Laravel controller Get csrf tokens in ajax calls
  5. Read Also:  check if folder exists before create directory Laravel
  6. Read Also:  Laravel MySQL Advanced Query Techniques with Example
  7. Read Also:  ng-maxlength using Angular Example
  8. Read Also:  NodeJS Login and Registration Authentication using mysql
  9. Read Also:  ng-minlength using Angular Example
  10. Read Also:  How to Create html to pdf using php | Convert HTML to PDF using PHP