More brainstorming from training session in LA, 5/1/08 with Chris Beams, Tchavdar Ivanov (FIM) and myself.
@Validator could be a class level annotation eligible for component scans, the methods of which could be annotated with @Validate (or similar) which would enable method/request param specific validation within the request handling workflow
- Like the @HandlerInterceptor design (
SPR-4770) @Validator could take a list of @Controller classes for a more fine grained approach or @Controller could take a list of @Validator which would match the current register model (I think I like the later)
@Validate would define a method used to validate an @RequestParam, it'd might be neat if it handled superset of @RequestParam and @RequestMapping arguments for a very fine grained approach, i.e. @Validate("reward", method=RequestMethod.POST).
- Another option would be to register the Validator with the @RequestParam
Hope you dig the ideas