From e8e7a15f8290da9fe60e1339bb9a2cd8c8efa71d Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 22 Mar 2019 21:23:17 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 3 +++ ayanova/src/api/gzaftervalidator.js | 37 ----------------------------- 2 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 ayanova/src/api/gzaftervalidator.js diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 944f7ff1..e6ab25cb 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -14,6 +14,9 @@ TODO CLIENT STUFF TODO NEXT +RETEST all validation now that the rules have been updated to the new format +Also, is there anything pulled into the validate code directly that is already available off the "v" variable? +- localization etc DATETIME diff --git a/ayanova/src/api/gzaftervalidator.js b/ayanova/src/api/gzaftervalidator.js deleted file mode 100644 index a1fe38d8..00000000 --- a/ayanova/src/api/gzaftervalidator.js +++ /dev/null @@ -1,37 +0,0 @@ -// import { isAfter, isEqual } from "date-fns"; -// import { parseDate as parse } from "../utils/date"; -import dayjs from "dayjs"; -/*eslint-disable */ -const gzAfterValidator = (value, { targetValue } = {}) => { - if (!targetValue) { - console.log("GZAFTERVALIDATOR - TARGET IS EMPTY!"); - return false; - //throw "GZAFTERVALIDATOR - TARGET IS EMPTY"; - } - value = dayjs(value); - targetValue = dayjs(targetValue); - - // if either is not valid. - if (!value || !targetValue) { - return false; - } - - //debugger; - return value.isAfter(targetValue); -}; - -const options = { - hasTarget: true, - isDate: true -}; - -// required to convert from a list of array values to an object. -const paramNames = ["targetValue"]; - -export { gzAfterValidator as validate, options, paramNames }; - -export default { - validate: gzAfterValidator, - options, - paramNames -};