Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling ActiveRecord vaidation errors #6

Open
wrzasa opened this issue Jan 19, 2015 · 2 comments
Open

Handling ActiveRecord vaidation errors #6

wrzasa opened this issue Jan 19, 2015 · 2 comments
Labels
Milestone

Comments

@wrzasa
Copy link

wrzasa commented Jan 19, 2015

I tried to use databound to implement simple CRUD. After adding validation to model I expected to have basic way to obtain information about error while creating new record. I found nothing about it in docs and do not know how to do it. Unfortunately, the fail promise callback is never used, result always goes to done! How is one supposed to handle validation errors?

@Nedomas Nedomas added the bug label Jan 21, 2015
@Nedomas
Copy link
Owner

Nedomas commented Jan 21, 2015

Thanks for reporting.

It is actually a bug that was introduced with f995f1e

It tries to capture errors in development environment and show them in a friendly way.

But I'm not sure on how to securely handle validations. Do you think we should get the invalid validation error to the Javascript? Would the standard "Error in the backend" error be sufficient?

@wrzasa
Copy link
Author

wrzasa commented Jan 24, 2015

Well... it seems quite clear. Validation error originates from the user, so we need to get sufficient information to present it to the user, as standard RoR form helper does. I don't think that "Error in the backend" would be of any help...

@Nedomas Nedomas added this to the v3 milestone Jul 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants