eview v0.9.6 EView.Views.ValidationError
This module provides renders that can be used whenever you want to show validation error.
Example:
changeset = %SampleSchema{}
|> SampleSchema.changeset(params)
case changeset.valid? do
true ->
conn
|> put_status(200)
|> render("page.json", map_keys_to_atom(params))
_ ->
conn
|> put_status(422)
|> render(EView.Views.ValidationError, "422.json", changeset)
end
Summary
Functions
Render a JSON Schema validation error