Skip to content

Commit

Permalink
Update extending.md
Browse files Browse the repository at this point in the history
I fixed some minor grammatical mistakes.
  • Loading branch information
erradim authored Jan 24, 2024
1 parent f7afa36 commit 994bd81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/extending.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Note that `addMethod` isn't magic, it mutates the prototype of the passed in sch
## Creating new Schema types

If you're use case calls for creating an entirely new type. inheriting from
and existing schema class may be best: Generally you should not inheriting from
If you're using case calls for creating an entirely new type, inheriting from
an existing schema class may be best: Generally you should not be inheriting from
the abstract `Schema` unless you know what you are doing. The other types are fair game though.

You should keep in mind some basic guidelines when extending schemas:
Expand All @@ -59,7 +59,7 @@ You should keep in mind some basic guidelines when extending schemas:
- transforms should never mutate the `value` passed in, and should return an invalid object when one exists
(`NaN`, `InvalidDate`, etc) instead of `null` for bad values.

- by the time validations run the `value` is guaranteed to be the correct type, however it still may
- by the time validations run, the `value` is guaranteed to be the correct type, however it still may
be `null` or `undefined`

```js
Expand Down

0 comments on commit 994bd81

Please sign in to comment.