How can insert the validation message for multi-line ?

Hello, I'm try to put multi-line on the validation message i use NewLine() Function .

The vaild message show like this: 


mvp_badge
MVP
Solution

Hi Majed ALanazi,

Note that the value assigned to Input.ValidationMessage property will insert textual content to the Validation Message span element, but for your use case, you need to inject HTML content. 

One of the approaches would be to use JS and few custom CSS as mentioned below.

CSS Snippet

.username_input span.validation-message {
    top: -18px;
    display: block;
    position: relative;
}

Demo Screen: MultiLineValidationMessage

Another approach that I could think of is to use an HTML widget or plain container (with a multi-line validation message) by wrapping it inside the IF widget and then toggling based on the validity of the input.

Refer to the attached oml.


I hope this helps you!


Kind regards,

Benjith Sam

There are many ways I can do this in the UI like tooltips for example but I want to know if I can do this in the validation message

Hi Majed ALanazi,

Have you tried using '<br>' or '\n' to see if this works or not?

Thanks

mvp_badge
MVP
Solution

Hi Majed ALanazi,

Note that the value assigned to Input.ValidationMessage property will insert textual content to the Validation Message span element, but for your use case, you need to inject HTML content. 

One of the approaches would be to use JS and few custom CSS as mentioned below.

CSS Snippet

.username_input span.validation-message {
    top: -18px;
    display: block;
    position: relative;
}

Demo Screen: MultiLineValidationMessage

Another approach that I could think of is to use an HTML widget or plain container (with a multi-line validation message) by wrapping it inside the IF widget and then toggling based on the validity of the input.

Refer to the attached oml.


I hope this helps you!


Kind regards,

Benjith Sam

Hi,

Use expression for each of your message, if you have 4 validation message use four expression and bound it with if condition for display msg according to requirement.

Regards

Shradha

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.