refactor: improved input validations

This commit is contained in:
liyasthomas
2021-08-08 12:01:36 +05:30
parent fee19f3d7a
commit 4d76c83328
18 changed files with 105 additions and 68 deletions

View File

@@ -107,14 +107,14 @@ export default defineComponent({
this.picked = picked
},
saveRequestAs() {
if (this.picked == null) {
this.$toast.error(this.$t("collection.select"), {
if (!this.requestName) {
this.$toast.error(this.$t("empty_req_name"), {
icon: "error",
})
return
}
if (this.$data.requestData.name.length === 0) {
this.$toast.error(this.$t("empty_req_name"), {
if (this.picked == null) {
this.$toast.error(this.$t("collection.select"), {
icon: "error",
})
return