[hibernate-dev] [Bean Validation] Constraints plural
Alaa Mohsen
alaa.mohsen at egyptdc.com
Wed Feb 18 10:43:57 EST 2009
I'll go for the second notation (the one with the inner annotation).
On Wed, Feb 18, 2009 at 5:35 PM, Emmanuel Bernard <emmanuel at hibernate.org>wrote:
> I have added the following plural forms
> AssertFalses
> AssertTrues
> //Digits to be redefined
> Futures
> Maxs
> Mins
> NotNulls
> Nulls
> Pasts
> Patterns
> Sizes
>
> As you can see not all names are pretty. Any improvement proposal?
>
> Alternatively, we could define inner annotations to define the plural, ie
>
> @interface Max {
> String message() default "...";
> Class<?> groups() default {};
>
> public static @interface Plural {
> Max[] value();
> }
> }
>
> @Max.Plural( {
> @Max(30, groups=JoeSixPack.class),
> @Max(100, groups=PowerUser.class)
> } )
>
> WDYT?
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20090218/e8068aef/attachment.html
More information about the hibernate-dev
mailing list