Skip to content

Commit 90d9391

Browse files
authored
3.x: Fix wrong description for bean validation annotations (#8667) (#8681)
1 parent 9a7d52c commit 90d9391

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

docs/mp/beanvalidation.adoc

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2021, 2022 Oracle and/or its affiliates.
3+
Copyright (c) 2021, 2024 Oracle and/or its affiliates.
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -104,7 +104,7 @@ Note that `double` and `float` are not supported due to rounding errors (some pr
104104
105105
106106
|`@Max`
107-
a|The annotated element must be a number whose value must be higher or equal to the specified minimum.
107+
a|The annotated element must be a number whose value must be lower or equal to the specified maximum.
108108
109109
Supported types are:
110110
@@ -117,12 +117,13 @@ Note that `double` and `float` are not supported due to rounding errors (some pr
117117
`Null` elements are considered valid.
118118
119119
|`@DecimalMin`
120-
a|The annotated element must be a number whose value must be lower or equal to the specified maximum.
120+
a|The annotated element must be a number whose value must be higher or equal to the specified minimum.
121121
122122
Supported types are:
123123
124124
* `BigDecimal`
125125
* `BigInteger`
126+
* `CharSequence`
126127
* `byte`, `short`, `int`, `long`, and their respective wrappers
127128
128129
Note that `double` and `float` are not supported due to rounding errors (some providers might provide some approximative support).
@@ -137,6 +138,7 @@ Supported types are:
137138
138139
* `BigDecimal`
139140
* `BigInteger`
141+
* `CharSequence`
140142
* `byte`, `short`, `int`, `long`, and their respective wrappers
141143
142144
Note that `double` and `float` are not supported due to rounding errors (some providers might provide some approximative support).
@@ -191,6 +193,7 @@ Supported types are:
191193
|`@Size`
192194
a|The annotated element size must be between the specified boundaries (included).
193195
Supported types are:
196+
194197
* `CharSequence` - length of character sequence is evaluated
195198
* `Collection` - collection size is evaluated
196199
* `Map` - map size is evaluated
@@ -212,7 +215,7 @@ Supported types are:
212215
213216
214217
|`@Past`
215-
a|The annotated element must be an instant, date or time in the past or in the present.
218+
a|The annotated element must be an instant, date or time in the past.
216219
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
217220
according to the virtual machine, applying the current default time zone if needed.
218221
@@ -242,6 +245,10 @@ a|The annotated element must be an instant, date or time in the past or in the p
242245
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
243246
according to the virtual machine, applying the current default time zone if needed.
244247
248+
The notion of present is defined relatively to the type on which the constraint is
249+
used. For instance, if the constraint is on a `Year`, present would mean the whole
250+
current year.
251+
245252
Supported types are:
246253
247254
* `java.util.Date`
@@ -263,7 +270,7 @@ Supported types are:
263270
264271
`Null` elements are considered valid.
265272
266-
|`@PastOrPresent`
273+
|`@Future`
267274
a|The annotated element must be an instant, date or time in the future.
268275
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
269276
according to the virtual machine, applying the current default time zone if needed.
@@ -294,6 +301,10 @@ a|The annotated element must be an instant, date or time in the present or in th
294301
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
295302
according to the virtual machine, applying the current default time zone if needed.
296303
304+
The notion of present here is defined relatively to the type on which the constraint is
305+
used. For instance, if the constraint is on a `Year`, present would mean the whole
306+
current year.
307+
297308
Supported types are:
298309
299310
* `java.util.Date`
@@ -315,7 +326,7 @@ Supported types are:
315326
316327
`Null` elements are considered valid.
317328
318-
|`@FutureOrPresent`
329+
|`@Pattern`
319330
a|The annotated `CharSequence` must match the specified regular expression.
320331
The regular expression follows the Java regular expression conventions see `java.util.regex.Pattern`.
321332
Accepts `CharSequence`.
@@ -325,6 +336,7 @@ Accepts `CharSequence`.
325336
|`@NotEmpty`
326337
a|The annotated element must not be `null` nor empty.
327338
Supported types are:
339+
328340
* `CharSequence` - length of character sequence is evaluated
329341
* `Collection` - collection size is evaluated
330342
* `Map` - map size is evaluated

0 commit comments

Comments
 (0)