Allow field validation/transform on nested JSON values

Created on 27 September 2021, over 3 years ago
Updated 25 May 2023, over 1 year ago

Problem/Motivation

I want to provide field level validation/transforms on nested JSON fields.

eg.
Validate data.parent.name is NotBlank.

{
  "data": {
    "a_field": "blah",
    "parent": [
      {"name": "child"},
      ...
    ]
  }
}

Proposed resolution

Something like this would be nice:

my_custom_pipeline:
  validations:
    field:
      a_field:
        NotBlank: {}
      parent[*].name:
        NotBlank: {}
Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇦🇺Australia tinny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024