Takes in a path and returns an object with a symbol.
When the validation lib sees this symbol, it will use the provided path to get a value from the current field's parent and use that value as the input to the Rule.
The path that's given is forwarded to lodash/get
lodash/get
fields: [// ... { // ... name: 'highestTemperature', type: 'number', validation: (Rule) => Rule.positive().min(Rule.valueOfField('lowestTemperature')), // ... },] Copy
fields: [// ... { // ... name: 'highestTemperature', type: 'number', validation: (Rule) => Rule.positive().min(Rule.valueOfField('lowestTemperature')), // ... },]
Takes in a path and returns an object with a symbol.
When the validation lib sees this symbol, it will use the provided path to get a value from the current field's parent and use that value as the input to the Rule.
The path that's given is forwarded to
lodash/get