Skip to content

@NotBlank(max=...) - include Max Length validation with @NotBlank #103

@rbygrave

Description

@rbygrave

In reviewing some validation cases there is the very common case of on Strings of:

  • @NotBlank @Size(max=...)
  • @NotBlank @Length(max=...) ... basically the same

Now although this is all good as it is per se I'm mindful of "Annotation Overload" which is that we have code with soooo many annotations that it detracts from the whole thing.

With this in mind I think its this very common case with String input in particular where I think it might be nice to support a @NotBlank(max=...) such that the common case only needs 1 annotation.

Hmm, pondering ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions