Skip to content

Commit 9e50384

Browse files
castrosurubiin
andauthored
feat(isLicensePlate): Updated isLicensePlate to accept real pt-PT license plates. (#2555)
Co-authored-by: Rubin Bhandari <roobin.bhandari@gmail.com>
1 parent 8d58ecb commit 9e50384

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

src/lib/isLicensePlate.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/validators.test.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14317,16 +14317,42 @@ describe('Validators', () => {
1431714317
args: ['pt-PT'],
1431814318
valid: [
1431914319
'AA-12-34',
14320-
'12·34·AB',
14320+
'12-AA-34',
14321+
'12-34-AA',
14322+
'AA-12-AA',
14323+
'AA·12·34',
1432114324
'12·AB·34',
14325+
'12·34·AB',
14326+
'AB·34·AB',
14327+
'AA 12 34',
14328+
'12 AA 34',
14329+
'12 34 AA',
1432214330
'AB 12 CD',
14331+
'AA1234',
14332+
'12AA34',
14333+
'1234AA',
1432314334
'AB12CD',
1432414335
],
1432514336
invalid: [
1432614337
'',
1432714338
'notalicenseplate',
14339+
'AA-AA-00',
14340+
'00-AA-AA',
14341+
'AA-AA-AA',
14342+
'00-00-00',
14343+
'AA·AA·00',
14344+
'00·AA·AA',
14345+
'AA·AA·AA',
14346+
'00·00·00',
14347+
'AA AA 00',
14348+
'00 AA AA',
14349+
'AA AA AA',
14350+
'00 00 00',
1432814351
'A1-B2-C3',
14352+
'1A-2B-3C',
1432914353
'ABC-1-EF',
14354+
'AB-C1D-EF',
14355+
'AB-C1-DEF',
1433014356
],
1433114357
});
1433214358
test({

0 commit comments

Comments
 (0)