Welcome to the Treehouse Community
Looking to learn something new?
Send the validation errors as JSON data.
What if I want to send the validation errors of the sign up/registration form as JSON data, so that it can be accessible to all platforms like: Android, IOS, Web. Also, in general what is the way to send any type of validation errors as JSON data.
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?
Kenneth LoveTreehouse Guest Teacher