Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32204
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Cecil Westerhof <Cecil@decebal.nl> |
| Newsgroups | comp.lang.java.programmer |
| Subject | What is the meaning of these two required fields |
| Date | Thu, 30 Jul 2015 09:52:59 +0200 |
| Organization | Decebal Computing |
| Lines | 25 |
| Message-ID | <87mvyersis.fsf@Equus.decebal.nl> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="14662"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XU/Ysr0aSixWe3ozynFEnah4Z74zLO4I=" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
| X-Homepage | http://www.decebal.nl/ |
| Cancel-Lock | sha1:26IWonBr93QkiIrKgPf5dYz9edw= sha1:Wq4S32JeyP5uMNQ3l96+Ve1WWZM= |
| Xref | csiph.com comp.lang.java.programmer:32204 |
Show key headers only | View raw
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