pow-auth / pow

Robust, modular, and extendable user authentication system
https://powauth.com
MIT License
1.59k stars 153 forks source link

Changeset errors into view #705

Closed churcho closed 1 year ago

churcho commented 1 year ago

I'd like to pipe changeset errors into my view, I'd like to add custom validators to the fields as well.

Do I have to create custom controller modules and handle everything there or I have to rely on the controllers compiled into the package on install? For some reason my changeset fields don't have any value in the errors: [] even if I add custom validation to the changeset pipeline.

danschultzer commented 1 year ago

The changeset error should definitely be populated if you have set up the changeset function as described in https://hexdocs.pm/pow/1.0.31/README.html#ecto-changeset

There's no need for custom controllers. Can you share what your schema module (or the particular validations) looks like?