Skip to content

Instantly share code, notes, and snippets.

@sergio-toro
sergio-toro / validate-spanish-id.js
Last active Apr 26, 2018 — forked from afgomez/validate_spanish_id.js
AngularJS service to validate spanish document id DNI / NIE / NIF
View validate-spanish-id.js
/**
* AngularJS service to validate spanish document id.
* Returns the type of document and checks its validity.
*
* Usage:
* angular
* .module('myApp', [ 'validate-spanish-id' ])
* .controller('myController', function(ValidateSpanishID){
* ValidateSpanishID.validate( str );
* })