I have a form where I have some fields for my models Project and User (note, I don't have all the fields for either).
This is a spring mvc application.
This is what I have now, but it is for only 1 model (Project), I need to now add some properties in my form for the User (but not all):
How can I validate both models when the user performs a post to my controller?Code:public ModelAndView create(@Valid Project, BindingResult result) { if(result.hasErrors()) { } }
I think that I may have to drop the @Valid in my controller and then do this programatically then right?


Reply With Quote
