Uploaded image for project: 'Bean Validation'
  1. BVAL-493

Simplify defining group on method validation

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.1-ideas
    • Component/s: None
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      The basic idea is to bring Spring's @Validated in some form into the specification.

      Currently it is possible to mimic this behavior by using @ConvertGroup, for example:

      MyBean update(@NotNull @Validated(Update.class) MyBean mybean);

      can be translated to

      MyBean update(@NotNull @Valid @ConvertGroup(from = Default.class, to = Update.class) MyBean mybean);

      but this a lot more verbose. I've seen that the current design tries to separate group definition from @Valid which is fine, but the current API should be simplified, possibly by making from default to Default.class?

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: