Skip to content

Commit

Permalink
🤖 Merge PR #69545 Add isLicensePlate and isLuhnNumber interface defin…
Browse files Browse the repository at this point in the history
…itions to @ types/validator by @xiaoxizi2303

Co-authored-by: liangguirong <liangguirong4@h-partners.com>
  • Loading branch information
xiaoxizi2303 and liangguirong committed May 11, 2024
1 parent 221ee80 commit 9e5d3a6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions types/validator/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
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;

/**
* Check if the string passes the [Luhn algorithm check](https://en.m.wikipedia.org/wiki/Luhn_algorithm).
*/
export function isLuhnNumber(str: string): boolean;

/**
* Check if the string is a locale.
*/
Expand Down

0 comments on commit 9e5d3a6

Please sign in to comment.