Ash FrameworkAF
Ash Framework6mo ago
2 replies
E

Using a relationship in a validation (atomicly)

I couldn't easily find this in the docs, but can use refer to relationships (easily) in validations? For example, we have widgets with a width and x property. Widgets belong_to a Scene that have a width property. We want to make sure that a Widget's x + width property is less than it's parent Scene's width?

I assume you need to use a custom validation for this. But can you make that custom validation atomic somehow?
Was this page helpful?