Description
🚀 Issue Summary
I’m using Frictionless Py to validate a CSV file and need help enforcing some conditional validation rules.
✅ Expected Validation Rules
1️⃣ Conditional Enum Validation:
- If the
country_code
field contains"US"
, then thecountry_description
field must be"United States"
.
2️⃣ Conditional Presence Validation:
- If one field contains a value, another specific field must not be empty.
3️⃣ Conditional Answer Code Validation:
- If the
code
field contains"44250-9"
, then theanswer_code
field must be one of:
"LA6568-5"
,"LA6569-3"
,"LA6570-1"
, or"LA6571-9"
.
4️⃣ Warning Instead of Error Validation:
For some validation failures, we would prefer to show warnings rather than blocking errors. Is there a way to configure this in Frictionless Py?
5️⃣ Handling Multiple Values in a Single Field
Does Frictionless support validating multiple values in a single field when separated by a semicolon (;)? Currently, it only supports enum validation with a single value. Is there a way to enable validation for multiple values using a semicolon as the separator?
🔧 What I’ve Tried
I’ve explored the Frictionless schema and custom validation checks, but I’m not sure about the best approach to enforce these conditions.
💡 Questions
- What is the recommended way to implement these rules in Frictionless Py?
- Should I use custom validation functions or is there a built-in way to handle these dependencies?
- Any examples or references would be greatly appreciated!
Thanks in advance for any guidance! 🙌