Mercurial > gemma
changeset 397:b5555bf6d45c
fix: Clear errors on user switch
When user switched selection of which accounts to edit,
validation errors werent cleared.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 14 Aug 2018 09:59:55 +0200 |
parents | c6290776c65c |
children | 0b8921797064 |
files | client/src/components/Userdetail.vue |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/Userdetail.vue Mon Aug 13 19:07:34 2018 +0200 +++ b/client/src/components/Userdetail.vue Tue Aug 14 09:59:55 2018 +0200 @@ -84,6 +84,16 @@ <script> import app from "../main"; +const clearedErrors = () => { + return { + email: "", + country: "", + role: "", + password: "", + passwordre: "" + }; +}; + const isEmailValid = email => { /* cf. types.go */ // eslint-disable-next-line @@ -127,6 +137,7 @@ user() { this.currentUser = { ...this.user }; this.path = this.user.name; + this.errors = clearedErrors(); } }, computed: {