Accessing the form validation rules within the form builder

October 21, 2024 6:20 AM

Hi all.

After looking through what is available in terms of validation for form fields, it looks to me like there is only limited validation exposed on the field properties configuration through the use of the required checkbox. It appears then that there are additional controls available with other more specific validation rules built into the logic of the components.

I can see in the code that there are still references to the RegisterFormValidationRule which is used to define the standard set of validation (regex, min/max, compare, email, and more) available on prior versions of Kentico.

Are there plans to expose these dynamic validation rules through the UI, or is it intended that we create custom components to deal with each validation scenario independently?

Answers

October 22, 2024 5:10 AM

You're right about needing custom components for advanced validation, as the UI currently only handles basic validation like "Required". The RegisterFormValidationRule is still available for custom validation. As far as I know, there's no official plan on the roadmap to expose these rules in the UI yet.

For now, you'll need to implement custom validation using the API.

Since there’s no mention of this feature on the roadmap, I’d recommend submitting it as a suggestion!

October 22, 2024 5:58 PM

@milanlund is right. The Form Builder is kinda limited (a bit more limited than in KX13) because it uses a different technology stack than the latest version of Xperience's Page Builder.

We know about this limitation, but any feedback you can provide via roadmap.kentico.com is welcome!

I can't commit to any dates, but you might see big improvements to how forms and the Form Builder works in Xperience toward the middle of next year, similar to how we will soon begin rolling out a much improved email authoring experience with the Email Builder.

To answer this question, you have to login first.