Skip to content

Commit 35c7eac

Browse files
committed
docs: fix oneOfType description (all -> any)
1 parent cfd94c8 commit 35c7eac

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ results.then((errors) => {
132132
| Number | Simple Number type |
133133
| Object | Simple Object type this type give you posibility to black box |
134134
| Boolean | Simple Boolean type |
135-
| Date | This type check value is instance of Date |
136-
| Array | This type check value is array of any value |
137-
| new Schema | This type check value is instance of Schema and validate value by this schema |
138-
| Schema.oneOfType([type1, type2, ...]) | This type give you posibility check one of types it will return error if value don't match all types |
135+
| Date | This type checks if value is instance of Date |
136+
| Array | This type checks if value is array of any value |
137+
| new Schema | This type checks if value is instance of Schema and validate value by this schema |
138+
| Schema.oneOfType([type1, type2, ...]) | This type checks if value matches any of given types |
139139
| Schema.optionalType(type) | This type will pass validation if value is null or undefined when field is not required |
140140
| SchemaType | You can register new schema type that has name, validator, validator when field is required (requiredValidator) and getDefaultValue |
141-
| [OneOfTypesAbove] | This type check value is array of type |
141+
| [OneOfTypesAbove] | This type checks if value is array of given type |
142142

143143
### Custom validator attributes
144144

@@ -401,4 +401,3 @@ const errors = schema.validate(modelObject);
401401
console.log(Object.keys(errors).length > 0); // false
402402

403403
```
404-

0 commit comments

Comments
 (0)