-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
I love this library, but I almost never build my own changeset validation functions because it's too cumbersome. I usually just use with after using params validation for types.
However, I think that it would be awesome if we could put validation functions in the schema. Could we somehow detect those and build a changeset validation out of functions, as long as they have the right call signature?
defparams asdf %{
x!: fn :x, x -> is_integer(x) and x > 0 end,
y!: :string,
}
This would satisfy the other 20% of api validation that I need. I'm happy to take a stab at this, if you guys think that it's feasible and desirable.
matejkepes and georgelima
Metadata
Metadata
Assignees
Labels
No labels