nextflow_thai_personal_id 1.0.2 copy "nextflow_thai_personal_id: ^1.0.2" to clipboard
nextflow_thai_personal_id: ^1.0.2 copied to clipboard

A plugin that you can use to validate Thai citizen's Personal ID value

Nextflow's Thai Personal Id checker #

Thai people's personal ID has 13 digit. So I decided to create a class with validate method to check correction.

you can apply it directly to TextField's validate result, or decide to invoke validate() method yourself.

Getting Started #

You can use this with TextFormField's validate property

Using with TextFormField #


ThaiIdValidator validator = ThaiIdValidator(errorMessage: 'Incorrect, Please check again');

TextFormField(
    validate: validator.validate
)

Using in dart code #


ThaiIdValidator validator = ThaiIdValidator(errorMessage: 'Incorrect, Please check again');

String errorMessage = validator.validate('thai personal id');

if(errorMessage != null) {
    // personal id not pass
} else {
    // go go!
}

Using static method #

NOTE: This static method cannot be used with TextFormField


String errorMessage = ThaiIdValidator.validateNow(personalId: 'thai personal id', errorMessage: 'Incorrect, Please check again');

if(errorMessage != null) {
    // personal id not pass
} else {
    // go go!
}
10
likes
20
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

A plugin that you can use to validate Thai citizen's Personal ID value

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on nextflow_thai_personal_id