From 7ca0a72e8a01b7ca892b98f6282c924ee4bb8659 Mon Sep 17 00:00:00 2001 From: singuerinc Date: Mon, 25 Feb 2019 22:23:54 +0100 Subject: [PATCH] feat: isValid when is special --- src/isValid.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/isValid.js b/src/isValid.js index b3c491d..bc3c11a 100644 --- a/src/isValid.js +++ b/src/isValid.js @@ -1,5 +1,6 @@ import { _partsNew } from "./_utils"; import { isOld } from "./isOld"; +import { isSpecial } from "./isSpecial"; /** * Returns true if is a valid (post year 2000) car plate @@ -14,6 +15,10 @@ function isValid(value) { return true; } + if (isSpecial(value)) { + return true; + } + const str = !value ? "" : value; const cleaned = _partsNew(str).join("");