AlexR
04/10/2025, 2:55 PMAlexR
04/10/2025, 7:27 PMumb-form-validation-message
shows the validation messages, only if the control is invalid (on a custom invalid event) and if it's not pristine. But the way I am adding messages through the validation context does not make that control invalid (it does not pass the message into it just marks the property editor element as invalid which displays that "danger" icon).
so, instead of adding a validator into the validation context, I need to somehow add a validator inside that form component/control via addValidator
function. but I don't think there is a way to get the control by its alias through any of the contexts, not sure.
just a bit for a context: I could create a server side validation for it, but I'd like to display an error message in a property editor by its alias (if possible) when user presses Submit in the Block Workspace Editor.AlexR
04/10/2025, 9:53 PMvalidationContext.messages.addMessage("server", ...)
. Which would pass down the validation message to a form control because of a UmbBindServerValidationToFormControl
that is being set for the form control element. This is a bit unintuitive. I would expect the data paths to work for the "client" as well, but it's just my assumption.AlexR
04/10/2025, 10:00 PMAlexR
04/10/2025, 11:38 PM