Is it possible to run a custom validator against each element of array in Grape? I know I can validate whole array with my validator, but I think error messages would be better if I use it for each element.
My parameters look like this:
"conditions": [
{
"field": "interests",
"operator": "any",
"value": ['cars', 'cats']
},
{
"field": "age",
"operator": "gt",
"value": 25
}
]
With requires :conditions, type: Array, valid_conditions: true
the validator is run for the whole array. Is it best I can get?