We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents abfe727 + d95f3f5 commit 9e111c9Copy full SHA for 9e111c9
API.md
@@ -664,9 +664,11 @@ Outputs the original untouched value instead of the casted value.
664
- `isRaw` - whether to enable raw mode or not. Defaults to true.
665
666
```js
667
-const schema = {
668
- timestamp: Joi.date().format('YYYYMMDD').raw()
669
-};
+const timestampSchema = Joi.date().timestamp();
+timestampSchema.validate('12376834097810'); // { error: null, value: Sat Mar 17 2362 04:28:17 GMT-0500 (CDT) }
+
670
+const rawTimestampSchema = Joi.date().timestamp().raw();
671
+rawTimestampSchema.validate('12376834097810'); // { error: null, value: '12376834097810' }
672
```
673
674
#### `any.empty(schema)`
0 commit comments