From b2f753a11a0ecf90b48e2680f8b7bac52b1761f5 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Tue, 9 Jul 2024 16:28:59 +0200 Subject: [PATCH] :sparkles: [open-formulieren/open-forms#4420] AddressNL component validation updated the addressNL componentschema to include components, where we define the validation for the fields under the addressNL component. It's defined under component to have a similar form as other formio components --- src/formio/components/addressNL.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/formio/components/addressNL.ts b/src/formio/components/addressNL.ts index 86b20ae..47cd8f2 100644 --- a/src/formio/components/addressNL.ts +++ b/src/formio/components/addressNL.ts @@ -13,6 +13,16 @@ export interface AddressData { secretStreetCity?: string; } +export interface ComponentValidation { + validate: {pattern: string}; + translatedErrors: object; +} + +export interface AddressComponents { + postcode: ComponentValidation; + city: ComponentValidation; +} + export type AddressNLInputSchema = InputComponentSchema; /** @@ -24,4 +34,5 @@ export interface AddressNLComponentSchema type: 'addressNL'; deriveAddress: boolean; layout: 'singleColumn' | 'doubleColumn'; + components: AddressComponents; }