pub fn has_bad_request_violations(&self) -> bool {
        if let Some(bad_request) = &self.bad_request {
            return !bad_request.field_violations.is_empty();
        }
        false
    }
Returns `true` if [`BadRequest`] is set and its `field_violations`
vector is not empty, otherwise returns `false`.

# Examples

```
use tonic_types::ErrorDetails;

let mut err_details = ErrorDetails::with_bad_request(vec![]);

assert_eq!(err_details.has_bad_request_violations(), false);

err_details.add_bad_request_violation("field", "description");

assert_eq!(err_details.has_bad_request_violations(), true);
```
tonic-types/src/richer_error/error_details/mod.rs