Only one validation message shown

Only one validation message shown

  

Hi All,


i've a screen with 2 input fields which are both invalid.

Both validation-messages are set, but only the field with focus on is showing the message.

The fields itself have both red-lining.

How to show both messages??


Greetz and thanks in advance


Hi,


afaik this should not happen, unless you did something custom.

Best way is to provide an oml where it occurs so we can help you better.


In any case, is it client-validation or server?


Hi J.,


it is custom-made server-side validation...

Just walking through the "Input validation Exercise"..


For example see attachment.... Only the 1th field shows the message... 

I did expect to see the message on both fields...


Hi Jeroen,


The message is shown if you focus on that input field. Only one message is shown at a time, which is default behaviour of OutSystems.


Regards,
Sam.

Hi Sam,


thanks !!

Although, i would have liked to see both :-)



Solution

Hi Jeroen,

This is arranged in the stylesheet of the theme. This hides the ValidationMessage and only shows it when the input gets the focus *and* the input has class Not_Valid:

You can override this behaviour in your local theme, by adding:

SyntaxEditor Code Snippet

.Not_Valid~.ValidationMessage {
    display:inline-block;
}


Good luck!

Solution

Lennart Kraak wrote:

Hi Jeroen,

This is arranged in the stylesheet of the theme. This hides the ValidationMessage and only shows it when the input gets the focus *and* the input has class Not_Valid:

You can override this behaviour in your local theme, by adding:

SyntaxEditor Code Snippet

.Not_Valid~.ValidationMessage {
    display:inline-block;
}


Good luck!

Hi Lennart,


you have been very helpfull !!!!
Thank you very much !!!


Lennart. Nice to know your solution