This commit is contained in:
2019-03-28 19:22:57 +00:00
parent 4955552e57
commit f3925bfd64
4 changed files with 71 additions and 12 deletions

View File

@@ -88,7 +88,7 @@
<v-layout align-center justify-space-around row wrap mt-5>
<v-flex xs1>
<v-btn @click="validate">Force validate</v-btn>
<v-btn>test 1</v-btn>
</v-flex>
<v-flex xs1>
<v-btn>test2</v-btn>
@@ -150,11 +150,11 @@ export default {
data() {
return {
obj: {},
serverErrors: {},
serverError: {},
formReady: false
};
},
methods: {
methods: {
getDataFromApi() {
var url = "Widget/" + this.$route.params.id;
this.$gzapi.get(url).then(res => {
@@ -175,13 +175,12 @@ export default {
.then(res => {
if (res.error) {
//debugger;
//Set errors so form can pick them up for controls in canHasServerErrors
that.serverErrors = res.error;
//Set errors so form can pick them up for controls in canHasServerErrors
that.serverError = res.error;
// that.$refs.form.resetValidation();
// that.$refs.form.validate();
//example error when submit when there are no roles set at all (blank)
//{"error":{"code":"2200","details":[{"code":"2200","message":"","target":"roles","error":"VALIDATION_FAILED"}],"message":"Object did not pass validation"}}
} else {
//Logic for detecting if a post or put: if id then it was a post, if no id then it was a put
if (res.id) {