GSTValidator constructor
GSTValidator()
validate the GST number.
The valid GST (Goods and Services Tax) number must satisfy the following conditions:
- It should be 15 characters long.
- The first 2 digits denote the unique State Code in accordance with the Indian Census 2011. For instance, the State Code of New Delhi is '07' and that of Karnataka is '29'.
- The next 10 characters denote the PAN (Permanent Account Number) of the taxpayer.
- The 13th digit denotes the Registration Number (or Entity Number) of the tax payer with the same PAN.
- The 14th digit is 'Z' by default for all – not intending anything currently.
- The 15th digit is the Check sum digit – can be a number or an alphabetical character.
see https://www.geeksforgeeks.org/how-to-validate-gst-goods-and-services-tax-number-using-regular-expression/ https://dba.stackexchange.com/questions/203612/validating-the-gst-identification-number-gstin https://stackoverflow.com/questions/44431819/regex-for-gst-identification-number-gstin
Implementation
factory GSTValidator() {
_instance ??= GSTValidator._();
return _instance!;
}