Skip to content

Commit

Permalink
docs(validators): update the sameAs docs, closes vuelidate#884
Browse files Browse the repository at this point in the history
  • Loading branch information
dobromir-hristov committed Jul 1, 2021
1 parent ebe2584 commit 7bbea48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/docs/src/validators.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,16 @@ export default {

* **Usage:**

Checks for equality with a given property. Accepts a ref, a direct reference to a data property, or a raw value.
Checks for equality with a given property. Accepts a ref, a direct reference to a data property, or a raw value to compare to it directly.

```js
export default {
validations () {
return {
confirmPassword: {
sameAsPassword: sameAs(this.password),
sameAsRef: sameAs(ref),
sameAsRaw: sameAs('foo')
sameAsPassword: sameAs(this.password), // can be a reference to a field or computed property
sameAsRef: sameAs(ref), // can be passed a ref to compare
sameAsRawValue: sameAs('foo') // this will compare if `sameAsRawValue` equals to "foo"
}
}
}
Expand Down

0 comments on commit 7bbea48

Please sign in to comment.