From 6550307caaeb8af27af1d8c821d9d342745a849f Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 11 Mar 2019 23:08:34 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 3 ++- ayanova/src/api/gzvalidate.js | 3 +++ ayanova/src/views/inventory-widget-edit.vue | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 73b1d786..b8e732f4 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -30,7 +30,7 @@ DATETIME - My rules object needs to be coded so I can easily specify a collection of rules appropriate to a form field - So, for example let's say I have a date input, if I commonly need one to be required and be after or before another field then I should have a single combined rule of RequiredAndAfterTarget and this method is aggregates both the required and the After rules into a single collection returned - + - Test on mobile and desktop all browsers before moving on, it must be solid with error handling (required, after before etc) and etc and then if all is well we can move on to the other field types @@ -43,6 +43,7 @@ DateTime field next - API get code is incorrectly dealing with expired bearer cert, a 401 is returned and it tries to parse the result as if it succeeded when it really should trigger a login process - Time zone offset mismatch warning needs expansion, it should only prompt a few times (maybe or find a way to deal with this) and it should offer to change it at the server automatically +- Localize time zone mismatch warning - Don't like popup messages, would rather see a notification icon and be part of that unless it's super critical - Implement a toaster or some similar notification diff --git a/ayanova/src/api/gzvalidate.js b/ayanova/src/api/gzvalidate.js index eee693f5..9c8265ec 100644 --- a/ayanova/src/api/gzvalidate.js +++ b/ayanova/src/api/gzvalidate.js @@ -28,6 +28,9 @@ export default { return false; } }, + Max255(ltkey, value) { + return this.MaxLength(ltkey, value, 255); + }, After(startDate, endDate) { if (startDate === undefined || startDate === null) { return false; diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index 1abea8fb..442dd1de 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -8,6 +8,7 @@ v-model="obj.name" :counter="255" :label="this.$gzlocale.get('WidgetName')" + :rules="[this.$gzv.Max255('WidgetName',obj.name)]" name="name" required >