Skip to content

Commit

Permalink
docs: add this.validationContext to README
Browse files Browse the repository at this point in the history
  • Loading branch information
aldeed committed Jun 25, 2020
1 parent 0c5c432 commit a1564aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ You may have noticed that many of the rule properties can be set to functions th
- `this.operator`: If isSet = true and isUpdate = true, this contains the name of the update operator in the modifier in which this field is being changed. For example, if the modifier were `{$set: {name: "Alice"}}`, in the autoValue function for the `name` field, `this.isSet` would be true, `this.value` would be "Alice", and `this.operator` would be "$set".
- `this.parentField()`: Use this method to get information about the parent object. Works the same way as `field()`.
- `this.siblingField()`: Use this method to get information about other fields that have the same parent object. Works the same way as `field()`. This is helpful when you use sub-schemas or when you're dealing with arrays of objects.
- `this.validationContext`: The current validation context
- `this.value`: If isSet = true, this contains the field's current (requested) value in the document or modifier.

### Getting field properties
Expand Down

0 comments on commit a1564aa

Please sign in to comment.