Skip to content

Commit

Permalink
docs: minor grammatical tweaks (vuelidate#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherry authored Jul 10, 2021
1 parent 28a2a80 commit 5d39632
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can nest validators to match your data as deep as you want. Parent validator
## $error vs $anyError

There are two common ways of considering if an error should be displayed. It is important to understand which one suits your use case better. You can use either `$error` or `$anyError` validation property, or by extension, the low-level variants: `$dirty` or `$anyDirty`. Note that this documentation uses mainly `$error` variant in it's examples, but the choice is yours to make.
There are two common ways of considering if an error should be displayed. It is important to understand which one suits your use case better. You can use either `$error` or `$anyError` validation property, or by extension, the low-level variants: `$dirty` or `$anyDirty`. Note that this documentation uses mainly `$error` variant in its examples, but the choice is yours to make.

> Example
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/src/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
As we mentioned in the [getting started guide](/#getting-started-2), validation rules are defined inside the object returned by the `validations`
method. We will refer to those as just _validations_ from now on.

You can access the component's instance, and it's properties via `this` when writing more complicated validation rules.
You can access the component's instance, and its properties via `this` when writing more complicated validation rules.

::: warning
**Note:** Pre Vuelidate 2 `validations` was allowed to be an object as well as a function. This is still available, for backwards compatibility
Expand Down Expand Up @@ -196,7 +196,7 @@ export default {
}
```

This will create an internal watcher, that will update `$dirty`, the moment that field property is changed. It will ensure the validator tracks it's
This will create an internal watcher, that will update `$dirty`, the moment that field property is changed. It will ensure the validator tracks its
bound data, and sets the dirty state accordingly.

You can then change your field's `v-model` expression to just the data property:
Expand Down Expand Up @@ -284,7 +284,7 @@ As you can see, the `name` field has its own `$dirty`, `$error` among other attr
The root properties like, `$dirty`, `$error` and `$invalid` are all collective computed properties, meaning their value changes depending on the
nested children's state.

**Example:** If a form has 10 fields and one of them has it's `$error: true`, then the root `$error` will also be `true`, giving additional
**Example:** If a form has 10 fields and one of them has its `$error: true`, then the root `$error` will also be `true`, giving additional
flexibility when trying to display error state.

## Displaying error messages
Expand Down
2 changes: 1 addition & 1 deletion packages/validators/src/utils/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function unwrapValidatorResponse (result) {
}

/**
* Unwraps a `NormalizedValidator` object, returning it's validator function.
* Unwraps a `NormalizedValidator` object, returning its validator function.
* @param {NormalizedValidator | Function} validator
* @return {function}
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/vuelidate/src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function sortValidations (validationsRaw = {}) {
}

/**
* Calls a validation rule by unwrapping it's value first from a ref.
* Calls a validation rule by unwrapping its value first from a ref.
* @param {Validator} rule
* @param {Ref} value
* @param {VueInstance} instance
Expand Down
6 changes: 3 additions & 3 deletions packages/vuelidate/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ function nestedValidations ({ $scope }) {

// inject the `injectChildResultsIntoParent` method, into the current scope
const sendValidationResultsToParent = inject(VuelidateInjectChildResults, () => {})
// provide to all of it's children the send results to parent function
// provide to all of its children the send results to parent function
provide(VuelidateInjectChildResults, injectChildResultsIntoParent)

const removeValidationResultsFromParent = inject(VuelidateRemoveChildResults, () => {})
// provide to all of it's children the remove results function
// provide to all of its children the remove results function
provide(VuelidateRemoveChildResults, removeChildResultsFromParent)

return { childResults, sendValidationResultsToParent, removeValidationResultsFromParent }
Expand All @@ -73,7 +73,7 @@ function nestedValidations ({ $scope }) {
* @typedef GlobalConfig
* @property {String} [$registerAs] - Config Object
* @property {String | Number | Symbol} [$scope] - A scope to limit child component registration
* @property {Boolean} [$stopPropagation] - Tells a Vue component to stop sending it's results up to the parent
* @property {Boolean} [$stopPropagation] - Tells a Vue component to stop sending its results up to the parent
* @property {Ref<Object>} [$externalResults] - External error messages, like from server validation.
*/

Expand Down

0 comments on commit 5d39632

Please sign in to comment.