How to show form validation errors in specific view template other than the conventional one

Hello everyone.
My code doesn’t have a separated view template for edit action, instead the edit form resides inside a div acting as bootstrap modal in view template.

The problem is that, upon submit if the form has validation errors, I want to show the errors in the same page instead of having CakePHP trying to render conventional view template to show the errors there.

I am afraid that you must do it manually. In normal workflow, errors are rendered in input’s divs generated by php at server site.
So if you want using js form, you must send data to controller and then catch response via XMLHttp or similar. In entity you have error field and if you find something there you must render this errors.

Maybe there is some add-ons but I don’t know them.

Yeah sure, I used fetch api to handle the task. Thank you