Skip to content

Commit 22d4e62

Browse files
authored
4.x: Fix wrong description for bean validation annotations (helidon-io#8505) (helidon-io#8556)
1 parent 77d623c commit 22d4e62

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

docs/src/main/asciidoc/mp/beanvalidation.adoc

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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).
@@ -212,7 +214,7 @@ Supported types are:
212214
213215
214216
|`@Past`
215-
a|The annotated element must be an instant, date or time in the past or in the present.
217+
a|The annotated element must be an instant, date or time in the past.
216218
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
217219
according to the virtual machine, applying the current default time zone if needed.
218220
@@ -242,6 +244,10 @@ a|The annotated element must be an instant, date or time in the past or in the p
242244
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
243245
according to the virtual machine, applying the current default time zone if needed.
244246
247+
The notion of present is defined relatively to the type on which the constraint is
248+
used. For instance, if the constraint is on a `Year`, present would mean the whole
249+
current year.
250+
245251
Supported types are:
246252
247253
* `java.util.Date`
@@ -263,7 +269,7 @@ Supported types are:
263269
264270
`Null` elements are considered valid.
265271
266-
|`@PastOrPresent`
272+
|`@Future`
267273
a|The annotated element must be an instant, date or time in the future.
268274
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
269275
according to the virtual machine, applying the current default time zone if needed.
@@ -294,6 +300,10 @@ a|The annotated element must be an instant, date or time in the present or in th
294300
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
295301
according to the virtual machine, applying the current default time zone if needed.
296302
303+
The notion of present here is defined relatively to the type on which the constraint is
304+
used. For instance, if the constraint is on a `Year`, present would mean the whole
305+
current year.
306+
297307
Supported types are:
298308
299309
* `java.util.Date`
@@ -315,7 +325,7 @@ Supported types are:
315325
316326
`Null` elements are considered valid.
317327
318-
|`@FutureOrPresent`
328+
|`@Pattern`
319329
a|The annotated `CharSequence` must match the specified regular expression.
320330
The regular expression follows the Java regular expression conventions see `java.util.regex.Pattern`.
321331
Accepts `CharSequence`.

0 commit comments

Comments
 (0)