Is there a way to programmatically set a field error in the content manager edit view from a plugin? I tried searching for a hook something from the helper plugin but had no luck.
I guess what I’m looking for is a way to provide custom validation methods in the edit view and I also want to set errors so the save button disables
Hi @mattmilburn, I am looking for the same thing ! Did fin a way to disable the save button
Right now I assume there is only one submit button inside the Edit View so I selected with Javascript and disable it if it does not fit my custom field logic
...
let submitButton = document.querySelector("button[type=submit]") as any;
if (data) {
submitButton.disabled = true;
submitButton.ariaDisabled = true;
} else {
submitButton.disabled = false;
submitButton.ariaDisabled = false;
}
...