poppinss / indicative

Indicative is a simple yet powerful data validator for Node.js and browsers. It makes it so simple to write async validations on nested set of data.
https://indicative.adonisjs.com/
MIT License
417 stars 52 forks source link

nested arrays validation #123

Closed enniel closed 7 years ago

enniel commented 7 years ago

Validation for nested arrays ignored.

// data
{
  "schema": [
    {
       "title": "List",
       "options": [
          {
            "title": "Option 1"
          }
       ]
    }
  ]
}
// rules
{
  "schema": "array",
  "schema.*.title": "required|string",
  "schema.*.options": "array",
  "schema.*.options.*.title": "required|string"
}
thetutlage commented 7 years ago

Indicative only validates one level deep nested arrays. Mentioned in docs http://indicative.adonisjs.com/#indicative-basics-array-expressions

For now I have no plans to support nested arrays