Closed
Description
David Pedowitz opened SPR-4774 and commented
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 (@HandlerInterceptor [SPR-4770] #9447)@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
Issue Links:
- Support for declarative validation (Hibernate Validator, anticipating JSR 303) [SPR-69] #4803 Support for declarative validation (Hibernate Validator, anticipating JSR 303)
- Improve support for registering Validator implementations in Spring MVC [SPR-9436] #14072 Improve support for registering Validator implementations in Spring MVC ("is superseded by")
9 votes, 10 watchers