Skip to content

Commit

Permalink
✨ [open-formulieren/open-forms#4420] AddressNL component validation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stevenbal committed Jul 9, 2024
1 parent 0492542 commit b2f753a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/formio/components/addressNL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<AddressData, Validator, TranslatableKeys>;

/**
Expand All @@ -24,4 +34,5 @@ export interface AddressNLComponentSchema
type: 'addressNL';
deriveAddress: boolean;
layout: 'singleColumn' | 'doubleColumn';
components: AddressComponents;
}

0 comments on commit b2f753a

Please sign in to comment.