Skip to content

Commit

Permalink
feat: isValid when is special
Browse files Browse the repository at this point in the history
  • Loading branch information
singuerinc committed Feb 25, 2019
1 parent eecd966 commit 7ca0a72
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/isValid.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,6 +15,10 @@ function isValid(value) {
return true;
}

if (isSpecial(value)) {
return true;
}

const str = !value ? "" : value;
const cleaned = _partsNew(str).join("");

Expand Down

0 comments on commit 7ca0a72

Please sign in to comment.