@globalbrain/sefirot
Advanced tools
Comparing version 0.11.0 to 0.12.0
@@ -0,1 +1,15 @@ | ||
# [0.12.0](https://github.com/globalbrain/sefirot/compare/v0.11.0...v0.12.0) (2020-09-14) | ||
### Bug Fixes | ||
* **validation:** mark regex rule as optional ([d66e7ee](https://github.com/globalbrain/sefirot/commit/d66e7ee0b44797fff8de8418c92974ccc1d24b36)) | ||
### Features | ||
* **validation:** add generic validation rule ([6250af1](https://github.com/globalbrain/sefirot/commit/6250af100265691f51589b5585701a209b54ccb7)) | ||
# [0.11.0](https://github.com/globalbrain/sefirot/compare/v0.10.0...v0.11.0) (2020-09-11) | ||
@@ -2,0 +16,0 @@ |
import email from './email' | ||
import regex from './regex' | ||
import required from './required' | ||
import rule from './rule' | ||
import url from './url' | ||
@@ -17,3 +18,4 @@ | ||
required, | ||
rule, | ||
url | ||
} |
@@ -8,5 +8,5 @@ import { regex as baseRegex } from '../validators' | ||
message, | ||
optional: false, | ||
optional: true, | ||
validate: value => baseRegex(value, regExp) | ||
} | ||
} |
@@ -1,5 +0,3 @@ | ||
import required from './required' | ||
export default function regex (value: any, regExp: RegExp): boolean { | ||
return !required(value) || regExp.test(value) | ||
return regExp.test(value) | ||
} |
{ | ||
"name": "@globalbrain/sefirot", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "Vue Components for Global Brain Design System.", | ||
@@ -5,0 +5,0 @@ "files": [ |
134612
102
813