1
1
///////////////////////////////////////////////////////////////////////////////
2
2
3
- Copyright (c) 2021, 2022 Oracle and/or its affiliates.
3
+ Copyright (c) 2021, 2024 Oracle and/or its affiliates.
4
4
5
5
Licensed under the Apache License, Version 2.0 (the "License");
6
6
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
104
104
105
105
106
106
|`@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 .
108
108
109
109
Supported types are:
110
110
@@ -117,12 +117,13 @@ Note that `double` and `float` are not supported due to rounding errors (some pr
117
117
`Null` elements are considered valid.
118
118
119
119
|`@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 .
121
121
122
122
Supported types are:
123
123
124
124
* `BigDecimal`
125
125
* `BigInteger`
126
+ * `CharSequence`
126
127
* `byte`, `short`, `int`, `long`, and their respective wrappers
127
128
128
129
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:
137
138
138
139
* `BigDecimal`
139
140
* `BigInteger`
141
+ * `CharSequence`
140
142
* `byte`, `short`, `int`, `long`, and their respective wrappers
141
143
142
144
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:
191
193
|`@Size`
192
194
a|The annotated element size must be between the specified boundaries (included).
193
195
Supported types are:
196
+
194
197
* `CharSequence` - length of character sequence is evaluated
195
198
* `Collection` - collection size is evaluated
196
199
* `Map` - map size is evaluated
@@ -212,7 +215,7 @@ Supported types are:
212
215
213
216
214
217
|`@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.
216
219
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
217
220
according to the virtual machine, applying the current default time zone if needed.
218
221
@@ -242,6 +245,10 @@ a|The annotated element must be an instant, date or time in the past or in the p
242
245
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
243
246
according to the virtual machine, applying the current default time zone if needed.
244
247
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
+
245
252
Supported types are:
246
253
247
254
* `java.util.Date`
@@ -263,7 +270,7 @@ Supported types are:
263
270
264
271
`Null` elements are considered valid.
265
272
266
- |`@PastOrPresent `
273
+ |`@Future `
267
274
a|The annotated element must be an instant, date or time in the future.
268
275
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
269
276
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
294
301
`Now` is defined by the `ClockProvider` attached to the `Validator` or `ValidatorFactory`. The default `clockProvider` defines the current time
295
302
according to the virtual machine, applying the current default time zone if needed.
296
303
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
+
297
308
Supported types are:
298
309
299
310
* `java.util.Date`
@@ -315,7 +326,7 @@ Supported types are:
315
326
316
327
`Null` elements are considered valid.
317
328
318
- |`@FutureOrPresent `
329
+ |`@Pattern `
319
330
a|The annotated `CharSequence` must match the specified regular expression.
320
331
The regular expression follows the Java regular expression conventions see `java.util.regex.Pattern`.
321
332
Accepts `CharSequence`.
@@ -325,6 +336,7 @@ Accepts `CharSequence`.
325
336
|`@NotEmpty`
326
337
a|The annotated element must not be `null` nor empty.
327
338
Supported types are:
339
+
328
340
* `CharSequence` - length of character sequence is evaluated
329
341
* `Collection` - collection size is evaluated
330
342
* `Map` - map size is evaluated
0 commit comments