Build webblocks to use on forms

Build webblocks to use on forms



I would like to build components to use on forms. I would like this components to have their own validations. For example I have multiple forms that use dates and I want same validations in all of them. Is it possible to have a webBlock that encapsulate the fields and validations and when I do submit of the form this validations are triggered. I would like to do the minimum work on the form. The perfect option would be just use WebBlock with a notify to get the values from it.

Hi Marcelo,

using a web block to accomplish that is not the best option. You could end up with a web block per input field and your flow would be very hard to understand. I would advise you to create some actions to run the validations and use those in your screen actions. 

The validation actions that I'm proposing would, for example, validate a date, and return a boolean that tells if the date is valid or not, and a message in the last case.