HI am starting to use spring 3 mvc and have run into a problem that don't know how to solve;
I am trying to validate a url @pathvariable using:
public String showGsscFormWithVenueId (@Valid
@Pattern(regexp="(0?[1-9]*)",message="venueid.not.number")
@PathVariable String venueId, BindingResult result, Model model) {
However I am getting an exception saying:
Errors/BindingResult argument declared without preceding model attribute. Check your handler method signature!
I've read about it on the internet and it says that bindingresult has to be after your model but my model is the pathVariable.
The only reason that I am using binding result is because I want to show the message="venueid.not.number" on the jsp. Therefore, could you please let me know if there is any other way ?