Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32204
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | What is the meaning of these two required fields |
| Date | 2015-07-30 09:52 +0200 |
| Organization | Decebal Computing |
| Message-ID | <87mvyersis.fsf@Equus.decebal.nl> (permalink) |
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?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll 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