Skip to content

Commit

Permalink
Fix 'required' common validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Maëlys Bras de fer committed Jun 25, 2021
1 parent 2795833 commit c299112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dockers/manager/front/src/components/ResetAndSave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {
return this.currentStep === this.lastStep;
},
isValidStep() {
return this.currentStep?.validate?.() ?? true;
return this.validate?.() ?? true;
},
saveColor() {
return this.isLastStep ? "positive" : "grey";
Expand Down
2 changes: 1 addition & 1 deletion dockers/manager/front/src/mixins/DeepForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function mapGetters(...names) {
}

export function required(msg) {
return v => v != false || msg;
return v => v && v != false || msg;
}

function isBasicType(obj) {
Expand Down

0 comments on commit c299112

Please sign in to comment.