Hi all, I am sending some post data to a controller and I want it to be populated to my form backing object and validate it. Without ajax when I send a http request the form backing object is automatically populated and when I put @Valid it is validated and errors are returned. But when I try to make the same with ajax my form backing object is not populated automatically.
How to do this? Can anyone please tell me. Right now I am using @RequestParam to get the parameters and validating without annotations.
Any help is greatly appreciated. Thank you, good day.
Sorry guys, there was some problem in my form and it was sending a 400 Bad request and due to that automatic binding and validation could not be done. Later when I saw my browser console I realized the problem.
subject: How to bind post data with my domain class?