GSTValidator constructor

GSTValidator()

validate the GST number.

The valid GST (Goods and Services Tax) number must satisfy the following conditions:

  1. It should be 15 characters long.
  2. 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'.
  3. The next 10 characters denote the PAN (Permanent Account Number) of the taxpayer.
  4. The 13th digit denotes the Registration Number (or Entity Number) of the tax payer with the same PAN.
  5. The 14th digit is 'Z' by default for all – not intending anything currently.
  6. 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!;
}