We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11faa3e commit b3a18b8Copy full SHA for b3a18b8
1 file changed
vue/dynamicforms/src/components/form/inputs/base.ts
@@ -34,7 +34,13 @@ export function useInputBase(props: BaseProps, emit: BaseEmits) {
34
},
35
});
36
37
- const errorsList = computed(() => props.errors || []);
+ const errorsList = computed(() => {
38
+ if (props.errors != null) {
39
+ if (props.errors instanceof Array) return props.errors;
40
+ return [props.errors];
41
+ }
42
+ return [];
43
+ });
44
45
const errorsDisplayCount = computed(() => errorsList.value.length);
46
0 commit comments