open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
33 stars 24 forks source link

Validation for fields within AddressNL component #4420

Open LaurensBurger opened 1 month ago

LaurensBurger commented 1 month ago

Thema / Theme

Form designer

Omschrijving / Description

to add to: #4418

Currently forms might be validating on the "city" and "postcode" fields. The AddressNL component does not seem to support validation on the fields within the component.

If this validation is lost these forms would have no way of using both the AddressNL component and BAG plugin.

sergei-maertens commented 1 month ago

Which validations can you do now that you can't do in the AddressNL field?

LaurensBurger commented 1 month ago

Only allow form te be filled in by residents of "Sergei City". If i don't have authentication/prefill for a form i would apply validation to the city field to achieve this. image

sergei-maertens commented 1 month ago

Okay, so a regex validation on individual nested fields would suffice then, I presume? And of course being able to specify validation error messages.

LaurensBurger commented 1 month ago

Yes - that sounds sufficient

joeribekker commented 1 month ago

Refinement: Allow regex on city and postal code.