diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 8f29d38e..e9c72e37 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -20,6 +20,7 @@ DATETIME - Validation - after much fuckery it's becoming clear that between the localization requirements and the complexity of server broken rules coming back from the api that I should just use my own validation code - See here: https://vuetifyjs.com/en/components/forms#form + - And here: https://vuetifyjs.com/en/components/text-fields#custom-validation - What is needed is a class that returns an array of functions that can be passed to vuetify "rules" property of components On change each rule is called in turn and if one returns false or a string then it's in an error state - I also need to add that it scans and or keeps a collection of broken rules that come back from the server and each component checks a rule that checks in turn for server broken rules in last api call diff --git a/ayanova/src/components/gzdateandtimepicker.vue b/ayanova/src/components/gzdateandtimepicker.vue index ae1aed2c..878872ca 100644 --- a/ayanova/src/components/gzdateandtimepicker.vue +++ b/ayanova/src/components/gzdateandtimepicker.vue @@ -62,14 +62,6 @@ export default { throw "GzDateAndTimePicker: $gzlocale is required and missing"; } }, - $_veeValidate: { - name() { - return this.label; - }, - value() { - return this.value; - } - }, data: () => ({ date: null, dlgdate: false, dlgtime: false }), props: { label: String, diff --git a/ayanova/src/main.js b/ayanova/src/main.js index 3b5f1f99..13b0aff4 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -32,19 +32,7 @@ Object.defineProperty(Vue.prototype, "$gzerror", { ///////////////////////////////////////////////////////////////// // FORM VALIDATION // -import VeeValidate from "vee-validate"; -//My custom rules -import gzaftervalidator from "./api/gzaftervalidator"; -VeeValidate.Validator.extend("gzafter", gzaftervalidator); -// VeeValidate.Validator.extend( -// gzaftervalidator, -// Rules[gzaftervalidator].validate, -// assign({}, Rules[gzaftervalidator].options, { -// paramNames: Rules[gzaftervalidator].paramNames -// }) -// ); -Vue.use(VeeValidate); -//Vue.config.productionTip = false; +//TODO: CODE THIS ///////////////////////////////////////////////////////////////// // ERROR HANDLING diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index 317fbdb3..d1054d1b 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -5,10 +5,8 @@ - - - - - - - - - + - -
    -
  • -
      -
    • {{ error }}
    • -
    -
  • -
-
+
@@ -158,9 +113,6 @@ /* eslint-disable */ export default { - $_veeValidate: { - validator: "new" - }, beforeCreate() { //Cache all required lt keys var ltKeysRequired = [