Return Field Errors in Your JSON Error Response

June 29, 2016

While developing the new Job board for Techlahoma (soon to launch), I decided to customize the JSON error response to include a field_errors key with a dictionary of the field names submitted, and the error message that maps to that field. This allows me to more easily create in-context error validation feedback for users without having to implement additional client-side validation. A huge win for productivity, and a really nice feature for anyone implementing the JSON API.

Here’s an animated GIF of the field validation in action:


Tags: , ,

Categories: ,