Reputation: 83
Suppose I am building a registration/signup or any form in general for my web app in Django and I want the same form for Web/Android/IOS. So I want the frontend and backend(Django) to communicate via JSON. My question is how can I send validation errors in JSON format if the user on any platform(Web/Android/IOS) gives me invalid data like "the email already exists" type of errors?
I need the best way possible to handle this type of scenarios and well-detailed example/explanation will be much appreciated.
Thank You.
Upvotes: 2
Views: 1299