angularjs-colombia-validators
v1.3.1
Published
AngularJS directives for Colombia data validators
Downloads
71
Readme
angularjs-colombia-validators
AngularJS directives for Colombia data validators AngularJS Colombia Validators
AngularJS Colombia Validators is a library that provides validators and masks for NIT/RUT numbers, Car Plates, Zip Codes and Phone Numbers / AngularJS Colombia Validators és una biblioteca que proporciona validaciones y máscaras para números RUT/NIT, Placas de vehículo, Código Postal y Teléfono. This library is a port of colombia-validators package for AngularJS.
Installation
With npm
npm i angularjs-colombia-validators
Adding script reference
<script src="node_modules/angularjs-colombia-validators/angularjs-colombia-validator.min.js">
The module code you need to import is 'colombia.validators'
const app = angular.module('mymodule', ['colombia.validators']); // Import example.
app.controller('mycontroller', ['$scope', $scope => {
// controller behavior here...
}]);
Validations
RUT/NIT
<input type="tel" name="nit-name" ng-model="model" co-nit />
PLATE
<!-- for all valid formats -->
<input type="text" name="plate-name" ng-model="model" co-car-plate />
PHONE NUMBER
<input type="tel" name="phone-name" ng-model="model" co-phone />
ZIP CODE
<input type="tel" name="zipcode-name" ng-model="model" co-zipcode />