curp

Creator: coderz1093

Last updated:

0 purchases

curp Image
curp Images

Languages

Categories

Add to Cart

Description:

curp

CURP #
Developed with passion by Pastel Code.


A package to easily validate and parse a Mexican CURP.
Features #

A Curp object can be constructed via parse or tryParse.
Provides a isValidString static method to check whether a string is a valid representation of a CURP.

Getting started #
To start using the package is required to import it like following:
import 'package:curp/curp.dart';
copied to clipboard
Usage #
Parse a string to a Curp object. #
const curpString = '...';
Curp.parse(curpString); // It returns a Curp object or throws a FormatException.
Curp.tryParse(curpString); // It returns a Curp object or null.
copied to clipboard
Retrieve CURP string #
After parsing a Curp object its value can be retrieved with:
final curp = Curp.parse('...');
final curpString = curp.toString();
copied to clipboard
Validate a CURP like string #
Check whether a string is a valid CURP representation.
const curpString = '...';
final isValid = Curp.isValidString(curpString); // true or false
copied to clipboard
Additional information #
For more information about CURP, head to official Mexican government website: https://www.gob.mx/curp/.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.