New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ec-docs-validator

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ec-docs-validator

Validador de los datos de documentos mas utilizados en Ecuador.

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
0
Created
Source

ECUADOR VALIDATOR DOCUMENTS

Validator for Ecuadorian Identification Documents
Validator para las identificaciones de los principales documentos usados en Ecuador: Cédula, ruc, teléfono fijo, teléfono celular, placas de vehiculos y motos, codigo postal y más datos.

Installation

To install this package, use npm:

npm install ec-docs-validator

Getting Started

Importing the Library

Javascript:

const validator = require('ec-docs-validator')

Typescript:

import validator from 'ec-docs-validator'

Usage

validator.ci(ci);
validator.ruc(ruc);
validator.cellphone(cellphone);
validator.telephone(telephone);
validator.plates(plate);
validator.zipCode(zipCode);

And you can use it like this:

validator.ci('1710034065'); // true
validator.ci('1234567890'); // false
validator.ruc('1804384731001'); // true
validator.ruc('1234567890123'); // false
validator.cellphone('0983484667'); // true
validator.cellphone('0884784667'); // false
validator.telephone('022895741'); // true
validator.telephone('022895741'); // true
validator.plates('PBA0389'); // true
validator.plates('IS150D'); // true
validator.plates('PBA038'); // false
validator.zipCode('128456'); // true
validator.zipCode('21456'); // false

Testing

To run the tests, use the following command:

npm test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author - Contact

Fernando Guevara Bayas - Website

Keywords

ecuador

FAQs

Package last updated on 06 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts