Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32205
| 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 | Jeff Higgins <jeff@invalid.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: What is the meaning of these two required fields |
| Date | Thu, 30 Jul 2015 04:49:21 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 27 |
| Message-ID | <mpcok6$p18$1@dont-email.me> (permalink) |
| References | <87mvyersis.fsf@Equus.decebal.nl> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Thu, 30 Jul 2015 08:52:22 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="8e164d158183579609bf09837dee5210"; logging-data="25640"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19da4VuXfxn0ZJMTDFXw2lCPG0aVA9/qmk=" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 |
| In-Reply-To | <87mvyersis.fsf@Equus.decebal.nl> |
| Cancel-Lock | sha1:yaSvSko2VHth0/y6bfN6oCUCbyc= |
| Xref | csiph.com comp.lang.java.programmer:32205 |
Show key headers only | 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
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