Skip to content

@Validator, @Validate [SPR-4774] #9451

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

9 votes, 10 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions