1.0.3 ā¢ Published 4 years ago
validate-rut-serie v1.0.3
Validate rut
Tool for validate rut with document number in Chile
Starting š
How to install š
First install with npm
npm i validate-rut-serie
Or yarn
yarn add validate-rut-serie
Using the tool āļø
First import the tool, then call the async method isValid, sending an object with rut and serie (without points), it will return an boolean
Example š©
const { isValid } = require("validate-rut-serie")
async function tellIfIsValid() {
const valid = await isValid({rut:"11.111.111-1", serie:"123456789"})
console.log(valid) // return true if is valid, or false if is invalid
}
tellIfIsValid()
Valid formats for serie
The only format is 9 numbers of the number document, without points, string format
Valid formats for rut āØļø
// valids
('18.972.631-7')
('18972631-7')
('189726317')
('9.068.826-k')
('9068826-k')
('9068826k')
// invalids
('18.972.631-0')
('18,972,631-7')
('18*972*631-7')
('18-972-631-7')
('error18.972.631-7')
('9068826-1')
('')
(189726317)
('0')
(0)
Building with: š ļø
Authors āļø
- Christian Rodriguez - Inforser - crod
Licence š
MIT
Thanks š
- Thanks for read this readme! š¢
āØļø with ā¤ļø for crod-inforser š