a simple package for curp validation
npm install @randyd45/curp-validationjs
import {CURP} from "curp-validation";let curp = new CURP("CUAJ980602MQRRRSXX");
`
The curp object is the main class that handles all the name, lastname and birthday verification.Valid format
This functionality verifies that the CURP input has a valid state, birthday, sex, and overall valid format. the function returns a true if the input is valid and false otherwise.
`js
curp.isFormatValid()
`Valid name
this functionality verifies if the name is valid accoding to the CURP input, this function returns true if it is valid and false otherwise.
`js
curp.isNameValid("MARIA JOSE")
`Valid lastname
this functionality verifies if the lastname is valid accoding to the CURP input, this function returns true if it is valid and false otherwise.
`js
curp.isFirstLastnameValid("DE LA CRUZ")
`Valid second lastname
this functionality verifies if the second lastname is valid accoding to the CURP input, this function returns true if it is valid and false otherwise.
`js
curp.isSecondLastnameValid("ARELLANO")
`Valid birthday
this functionality verifies if a birthday is valid accoding to the CURP input, this function returns true if it is valid and false otherwise.
`js
curp.isBirthdayValid(98, 6, 2)
`Extract birthday
this functionality extracts the birthday of the input curp.
`js
curp.extractBirthday()
``