docs: add additional docs for validations

This commit is contained in:
Zach Daniel 2023-09-29 10:11:14 -04:00
parent e730158bcd
commit e1ac4150a9

View file

@ -84,4 +84,17 @@ validations do
where present(:baz) where present(:baz)
end end
end end
``` ```
## Action-Specific Validation
You can also put a validation directly in an action, like so:
```elixir
actions do
create do
...
validate present([:foo, :bar], at_least: 1)
end
end
```