RadzenHtmlEditor not applying the 'invalid' class

Hello, I am using the RadzenHtmlEditor component inside a RadzenTemplateForm and have applied a validation to make the field required, which works correctly. However, the Name that I set on the component:

This name does not appear in the final HTML of the page, and it ends up not adding the 'invalid' class to the field, so I am unable to highlight the field to indicate the error.

Looking through the page, it really did not create the correct Name.

Indeed this isn't supported at the moment. RadzenHtmlEditor doesn't output an <input> element to set its name attribute.

And is there a way for me to add an additional event for when a validation error occurs, to check not only the name but also a data attribute so that I can work around this situation? Which script would I need to look at to modify?

I am afraid I don't understand your question.

I meant, where is the JavaScript that controls the verification of whether the editContext has any validation errors and adds the 'invalid' class to the fields corresponding to the names? I want to know if it's possible to modify this script so that it selects the fields not only by the input's name but also by a custom attribute that I create.

There is no such JavaScript.

I have just pushed a commit and now the valid and invalid classes will be applied to the outermost element rendered by RadzenHtmlEditor. Will go live with the next release probably later this week.

1 Like