Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32205

Re: What is the meaning of these two required fields

From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: What is the meaning of these two required fields
Date 2015-07-30 04:49 -0400
Organization A noiseless patient Spider
Message-ID <mpcok6$p18$1@dont-email.me> (permalink)
References <87mvyersis.fsf@Equus.decebal.nl>

Show all headers | View raw


On 07/30/2015 03:52 AM, Cecil Westerhof wrote:
> I wrote my own annotation:
>      // public
>      @Documented
>      @Constraint(validatedBy = {})
>      @Target({ FIELD })
>      @Retention(RUNTIME)
>      @ReportAsSingleViolation
>      @NotNull
>      @Size(min = 1)
>      public @interface NotEmpty {
>          // default
>          Class<?>[]                  groups()  default   { };
>          String                      message() default  "Field should be filled";
>          Class<? extends Payload>[]  payload() default  {};
>      }
>
> I understand the reason for message: that is the message for when
> there is a validation constraint.
>
> But what are the reasons for groups and payload?
>
<http://beanvalidation.org/1.1/spec/#constraintsdefinitionimplementation-constraintdefinition-properties>


<http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/>
And just ignore the Hibernate extensions if you like.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What is the meaning of these two required fields Cecil Westerhof <Cecil@decebal.nl> - 2015-07-30 09:52 +0200
  Re: What is the meaning of these two required fields Jeff Higgins <jeff@invalid.invalid> - 2015-07-30 04:49 -0400
  Re: What is the meaning of these two required fields Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 21:09 -0400

csiph-web