framework icon indicating copy to clipboard operation
framework copied to clipboard

Conditional Validation in CSV and JSON Schema

Open megin1989 opened this issue 9 months ago • 3 comments

I am working on a schema that includes the following fields:

  • SEXUAL_ORIENTATION_VALUE_CODE
  • SEXUAL_ORIENTATION_VALUE_CODE_DESCRIPTION
  • SEXUAL_ORIENTATION_VALUE_CODE_SYSTEM_NAME
  • SEXUAL_ORIENTATION_LAST_UPDATED

I need to enforce a condition in the schema such that if the fields SEXUAL_ORIENTATION_VALUE_CODE and SEXUAL_ORIENTATION_VALUE_CODE_DESCRIPTION have values in the CSV file, then the field SEXUAL_ORIENTATION_LAST_UPDATED must also be mandatory.

Could you please guide me on how to achieve this using Frictionless validation? Specifically, I need the schema to enforce this rule during data validation.

Thank you!

megin1989 avatar Jan 15 '25 07:01 megin1989