From 4b0fc1dbb3f60a485d3ba7ec27d7654a8ea0d382 Mon Sep 17 00:00:00 2001 From: Yoshie Muranaka Date: Mon, 6 Jan 2020 07:36:16 -0800 Subject: Update local user layout and styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resubmitting after reverted–original commit here https://gerrit.openbmc-project.xyz/c/openbmc/webui-vue/+/28790 - Add BVConfig plugin to modify boostrap component defaults - Add vuelidate - Add package and basic validations to user form - Add all user form validations - Add checks for edit user - Create VuelidateMixin for shared methods - Update Login to use Vuelidate Signed-off-by: Yoshie Muranaka Signed-off-by: Derick Montague Change-Id: Ib50ee4d1fb5f14637c9460e77f0682869a86ac8a --- src/components/Mixins/VuelidateMixin.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/components/Mixins/VuelidateMixin.js (limited to 'src/components/Mixins') diff --git a/src/components/Mixins/VuelidateMixin.js b/src/components/Mixins/VuelidateMixin.js new file mode 100644 index 00000000..8c617791 --- /dev/null +++ b/src/components/Mixins/VuelidateMixin.js @@ -0,0 +1,10 @@ +const VuelidateMixin = { + methods: { + getValidationState(model) { + const { $dirty, $error } = model; + return $dirty ? !$error : null; + } + } +}; + +export default VuelidateMixin; -- cgit v1.2.3