fix: allow any guid (#4252)

* Allow any guid

* Add a few more GUID tests
This commit is contained in:
Helder Sepulveda
2018-02-24 01:31:08 -05:00
committed by kyle
parent ba1603a7e2
commit d1779dc47b
2 changed files with 4 additions and 1 deletions

View File

@@ -445,7 +445,7 @@ export const validateDateTime = (val) => {
export const validateGuid = (val) => {
val = val.toString().toLowerCase()
if (!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}[)}]?$/.test(val)) {
if (!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(val)) {
return "Value must be a Guid"
}
}