[Event System] Server side validation messages not showing on inputs set to invalid on forms

Forge Component
Published on 2019-06-11 by Leonardo Fernandes
39 votes
Published on 2019-06-11 by Leonardo Fernandes


First of all, THANK YOU for this solution.

Last week I was doing some tests to use this on more complex scenarios where I have some complex web blocks to split the principal form to maintain some entities.

Things like Contact and Address of person and my goal is to coordinate on principal form the validations of child forms in web blocks and trigger an update event in these web blocks to send to parent form the data each one is keeping track of.

In this scenario if I make any validation on server side on FormValidate event and setting the return to false in this case the validation messages doesn't show on this secondary web blocks with forms.


Márcio, the FormValidate simply triggers events, and doesn't update the validation messages in the input fields. If you want to do that, you will need to set the Valid and ValidationMessage properties of the input, and refresh the input.

See here the relevant documentation: https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_Form_Inputs


It was what I did.

I did manual server side validation and set the Valid and ValidationMessage of this secondary form inputs, and it doesn't show up. All basic OS mechanisms are apparently ok. The form.IsValid is false, the return of FormUpdate event is false and the input have only the * near it. without the validation message set.

I wrote it this morning and now I did another test and can make it work.

If I add an Ajax refresh on the form validation handler of the web blocks been coordinated by the main screen it work properly and shows the server side validations.