File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change
1
+ <a name =" 1.8.0 " ></a >
2
+ # 1.8.0 (2020-10-18)
3
+
4
+ ## New ` nullable ` rule attribute in [ #185 ] ( https://github.com/icebob/fastest-validator/pull/185 )
5
+
6
+ ``` js
7
+ const schema = {
8
+ age: { type: " number" , nullable: true }
9
+ }
10
+ v .validate ({ age: 42 }, schema); // Valid
11
+ v .validate ({ age: null }, schema); // Valid
12
+ v .validate ({ age: undefined }, schema); // Fail because undefined is disallowed
13
+ v .validate ({}, schema); // Fail because undefined is disallowed
14
+ ```
15
+
16
+ ## Changes
17
+ - Shorthand for array ` foo: "string[]" // means array of string ` in [ #190 ] ( https://github.com/icebob/fastest-validator/pull/190 )
18
+ - allow converting ` objectID ` to ` string ` in in [ #196 ] ( https://github.com/icebob/fastest-validator/pull/196 )
19
+ -
1
20
--------------------------------------------------
2
21
<a name =" 1.7.0 " ></a >
3
22
# 1.7.0 (2020-08-30)
You can’t perform that action at this time.
0 commit comments