We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello. is there a way to access component data in helpers.withMessage? I want to have dynamic error messages which depends on component prop value.
helpers.withMessage
addresses: { $each: helpers.forEach({ city: { required: helpers.withMessage(getRequiredMessage(component.prop.userName), required) } }) } const getRequiredMessage = (userName) => `Please enter ${userName}'s city`
how can I do that?
I tried something like this and it broke the validation rule
$each: helpers.forEach({ city: { required: (a, b, c,) => helpers.withMessage(getRequiredMessage(a, b, c), required) //but then validation rule does not work itself } })
The text was updated successfully, but these errors were encountered:
I found how u can do this, you need create a function in the message parameter. Example:
const rules = { collections: { $each: helpers.forEach({ number: { minValue: helpers.withMessage( () => 'My message' + props.my_var_reactive, required ) } }) } }
Say me if this help you.
Sorry, something went wrong.
No branches or pull requests
hello. is there a way to access component data in
helpers.withMessage
? I want to have dynamic error messages which depends on component prop value.how can I do that?
I tried something like this and it broke the validation rule
The text was updated successfully, but these errors were encountered: