You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -256,7 +258,40 @@ an array of elements you have to use the `elements` method which returns an `Arr
256
258
-##### `elements()`
257
259
Returns an `ArrayElementRuleBuilder` which has access to nearly every rule from above as
258
260
the type of the arrays elements is unknown.
259
-
261
+
262
+
263
+
---
264
+
265
+
### `temporal` rules
266
+
267
+
#### Usage
268
+
The following snippet returns an instance of the `TemporalRuleBuilder` class.
269
+
```java
270
+
temporal(field)
271
+
```
272
+
273
+
#### Available rules
274
+
275
+
-##### `required()`
276
+
Marks the field as *required* meaning it cannot be null or empty.
277
+
278
+
-##### `optional()`
279
+
Marks the field as *optional*. All rules behind this rule can fail.
280
+
281
+
-##### `past()`
282
+
Checks if the *value* is before the current timestamp.
283
+
284
+
-##### `future()`
285
+
Checks if the *value* is after the current timestamp.
286
+
287
+
-##### `before(temporal)`
288
+
Takes a temporal object, for example `LocalDateTime`, `LocalDate` or `Date` and compares this to the value. Returns `true`, if the objects value is smaller than the given parameter.
289
+
290
+
-##### `after(temporal)`
291
+
Takes a temporal object, for example `LocalDateTime`, `LocalDate` or `Date` and compares this to the value. Returns `true`, if the objects value is greater than the given parameter.
0 commit comments