vee-validate
vee-validate copied to clipboard
[v4] target field label in cross-field global rule
Discussed in https://github.com/logaretm/vee-validate/discussions/3743
Originally posted by danh65 April 6, 2022 I have a cross-field global rule defined that validates the current field value against the target field value. I need to reference the target field label in the message to give a more meaningful message, but can't figure out how to do it.
See this codesandbox for an example: https://codesandbox.io/s/vee-validate-cross-field-validation-forked-yik6xc
Look at the 'date_after' rule in main.js. Is there a way to replace 'target' in the message with the label of the target field?