Skip to content

Commit 82fb3be

Browse files
committed
expand the property name check when the additionalProperties is false and we have patternProprties
1 parent 3d632b7 commit 82fb3be

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/vue-vuetify/src/complex/components/AdditionalProperties.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,21 @@ export default defineComponent({
315315
...(control.value.schema as any).propertyNames,
316316
...result,
317317
};
318+
} else if (
319+
(control.value.schema as any).additionalProperties === false &&
320+
typeof (control.value.schema as any).patternProperties === 'object'
321+
) {
322+
// check if additionalProperties explicitly set to false then the only valid property names will be derived from patternProperties
323+
324+
const patterns = Object.keys(
325+
(control.value.schema as any).patternProperties,
326+
);
327+
if (patterns.length > 0) {
328+
result = {
329+
pattern: patterns.join('|'),
330+
...result,
331+
};
332+
}
318333
}
319334
return result;
320335
});

0 commit comments

Comments
 (0)