-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New generator request: Faker::Company.indian_gst_number #2823
Comments
Hi @ankitkhadria thanks for the description! Could you clarify more what makes a generated value a valid GST(Tax) number? Thanks! |
Here is a format break-down of the GSTIN: The first two digits represent the state code as per Indian Census 2021. Every state has a unique code. For instance, I am using the same format to generate a dummy GST number so that it can go with a real project. |
Awesome, thank you @ankitkhadria I have tested it locally as well and it's looking good. |
* Added Faker::Company.indian_gst_number fixed #2823 * refactor: using positional generator and added state code validation * fix: state code validation condition * Update styling of if condition to check state code validation Co-authored-by: Stefanni Brasil <[email protected]> --------- Co-authored-by: Stefanni Brasil <[email protected]>
Is your feature request related to a problem? Please describe it.
So, in India, every business needs a goods and service tax number, my requirement was to assign random valid tax numbers to companies.
If you're adding new objects, please describe how you would use them
Provide examples of how the proposed feature could be useful and relevant.
I kind of started working on PR, It is useful to many ways
Instead of creating random numbers, we can actually create a valid GST(Tax) number, so that if applicable it passes all the validations and other checks.
For example, if proposing a new generator, explain why it's useful and relevant to Faker, and examples of how to use it in a real project.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
It's a 15 character Alphanumeric number, so for now creating a random one
Additional context
Add any other context or screenshots about the feature request here.
No translation is needed, it is an alphanumeric character.
The text was updated successfully, but these errors were encountered: