Skip to content
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

feat(isLicensePlate): added License Plate Regex for en-IN and all Indian locale #1944

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

NishantJS
Copy link
Contributor

Added support for Indian license plate validation. Valid examples from Wikipedia:

MH 04 AZ 4562

MH : STATE_CODE
04 : DISTRICT_CODE
AZ : UNIQUE_LETTERS
4562 : UNIQUE_NUMBERING

Basically all options can be written with dash, with space or all together or without symbol.

@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #1944 (a51103c) into master (c1b21a9) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #1944   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         2085      2099   +14     
  Branches       472       472           
=========================================
+ Hits          2085      2099   +14     
Impacted Files Coverage Δ
src/lib/isLicensePlate.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1b21a9...a51103c. Read the comment docs.

@NishantJS NishantJS changed the title en-IN and all india locale support for isLicensePlate feat(isLicensePlate): added License Plate Regex for en-IN and all Indian locale Mar 28, 2022
@rubiin rubiin merged commit 46118dc into validatorjs:master Jul 18, 2022
@rubiin
Copy link
Member

rubiin commented Jul 18, 2022

Thankyou for the contribution 🎉

};

validators['hi-IN'] = validators['en-IN'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missed this review, perhaps this wasn't necessary. At some point, we actually contemplated to just use country-code only in the locales for stuff like license plates, that really don't depend on language per se.

@rubiin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants