title: Django rest framework get validation error object in detail
body: <blockquote>
    <p>[ErrorDetail(string='This field is required.', code='required')]</p>
  </blockquote>
  
  <p>How get code from this object. I want separate error code for custom error response, i tried many solutions but i didn't get any working answer.</p>