Have zod
respect Rule.valueOfField(siblingField)
#516
Labels
help wanted
Please help me! I'm lonely.
zod
respect Rule.valueOfField(siblingField)
#516
After #336,
valueOfField
no longer breaks, but zod doesn't validate with them. Ideally,zod
would include all validations (except for custom, read this). It's difficult to layer in the validations at the field level, because the containing object isn't included (and doesn't exist yet, considering the field is part of the definition). We'd have to generate the object schema, then go back through each field and find the validations that usedvalueOfField()
to go and do those, which is somewhat of a back and forth. Might be worth it to ignore validations all together initially, generate the whole object schema, then layer the validations for each field on top of it. Would have to double check this works fine for objects of objects.The text was updated successfully, but these errors were encountered: