Fix Textarea validator

This commit is contained in:
philipp lang 2023-12-27 00:41:32 +01:00
parent 3eb63e9b49
commit acdaf54a91
1 changed files with 2 additions and 2 deletions

View File

@ -19,12 +19,12 @@ const emit = defineEmits(['update:modelValue']);
const props = defineProps({
modelValue: {
required: true,
validator: (value) => typeof value === 'string',
validator: (value) => value === null || typeof value === 'string',
},
field: {
required: true,
validator: (value) =>
hasKeys(value, ['required', 'type', 'key', 'columns', 'name', 'default']) &&
hasKeys(value, ['required', 'type', 'key', 'columns', 'name', 'default', 'rows']) &&
typeof value.required === 'boolean' &&
typeof value.key === 'string' &&
value.key.length > 0 &&