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
Add isLicensePlate and isLuhnNumber interface definitions to @ types/validator #69545
Conversation
@xiaoxizi2303 Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 69545,
"author": "xiaoxizi2303",
"headCommitOid": "7de94a1427df03b3b2ff6a04880ede57633204fa",
"mergeBaseOid": "20f1d855d85510c51368984655e4133d520301a2",
"lastPushDate": "2024-05-07T12:10:23.000Z",
"lastActivityDate": "2024-05-11T09:27:53.000Z",
"mergeOfferDate": "2024-05-08T15:37:09.000Z",
"mergeRequestDate": "2024-05-11T09:27:53.000Z",
"mergeRequestUser": "xiaoxizi2303",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "validator",
"kind": "edit",
"files": [
{
"path": "types/validator/index.d.ts",
"kind": "definition"
}
],
"owners": [
"tgfjt",
"chrootsu",
"IOAyman",
"louy",
"deptno",
"builtinnya",
"qqilihq",
"keatz55",
"MunifTanjim",
"vlapo",
"peterblazejewicz",
"Mattewn99",
"Almost-Infinity",
"dcfreire"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "jakebailey",
"date": "2024-05-08T15:36:29.000Z",
"isMaintainer": true
},
{
"type": "approved",
"reviewer": "codershiba",
"date": "2024-05-08T12:21:51.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 2098260958,
"ciResult": "pass"
} |
Hey @xiaoxizi2303, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
🔔 @tgfjt @chrootsu @IOAyman @louy @deptno @builtinnya @qqilihq @keatz55 @MunifTanjim @vlapo @peterblazejewicz @Mattewn99 @Almost-Infinity @dcfreire — please review this PR in the next few days. Be sure to explicitly select |
types/validator/index.d.ts
Outdated
export function isLicensePlate(str: string, locale:string): boolean; | ||
|
||
/** | ||
* check if the string passes the Luhn algorithm check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* check if the string passes the Luhn algorithm check. | |
* Check if the string passes the [Luhn algorithm check](https://en.m.wikipedia.org/wiki/Luhn_algorithm). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified
types/validator/index.d.ts
Outdated
@@ -808,6 +808,16 @@ declare namespace validator { | |||
*/ | |||
export function isLength(str: string, options?: IsLengthOptions): boolean; | |||
|
|||
/** | |||
* check if the string matches the format of a country's license plate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* check if the string matches the format of a country's license plate. | |
* Check if the string matches the format of a country's license plate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified
types/validator/index.d.ts
Outdated
/** | ||
* check if the string matches the format of a country's license plate. | ||
*/ | ||
export function isLicensePlate(str: string, locale:string): boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export function isLicensePlate(str: string, locale:string): boolean; | |
export function isLicensePlate(str: string, locale: 'cs-CZ' | 'de-DE' | 'de-LI' | 'en-IN' | 'es-AR' | 'hu-HU' | 'pt-BR' | 'pt-PT' | 'sq-AL' | 'sv-SE' | 'any'): boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address comments
@xiaoxizi2303 One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
@codershiba Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
@xiaoxizi2303: Everything looks good here. I am ready to merge this PR (at 7de94a1) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@tgfjt, @chrootsu, @IOAyman, @louy, @deptno, @builtinnya, @qqilihq, @keatz55, @MunifTanjim, @vlapo, @peterblazejewicz, @Mattewn99, @Almost-Infinity, @dcfreire: you can do this too.) |
Hi, when will this pr be incorporated? |
You can merge the PR yourself by following the instructions above. |
Ready to merge |
Add isLicensePlate and isLuhnNumber interface definitions to @ types/validator