Closed ardyfeb closed 5 years ago
Shouldn't it be variant.0.value.required
?
Shouldn't it be
variant.0.value.required
?
i edited my issue, actually is variant
i typo when writing issue
here a complete rules and message
Works fine for me with this code sample.
const { validate } = require('indicative/validator')
const data = {
variant: [{}]
}
validate(data, {
'variant.0.value': 'required'
}, {
'variant.0.value.required': 'Variant value cannot be empty'
}).catch(console.error)
Here's the live example https://repl.it/@amanvirk/Indicative-example
thanks for your help, solved by upgrading from 5.0.8
to 7.2.0
How to set custom message for array validation ?, i have trying like below code but message still showing
required validation variant.0.value failed
Package version
5.0.8
Node.js and npm version
latest
Sample Code (to reproduce the issue)