public sealed class BadRequest.Types.FieldViolation : IMessage<BadRequest.Types.FieldViolation>, IEquatable<BadRequest.Types.FieldViolation>, IDeepCloneable<BadRequest.Types.FieldViolation>, IBufferMessage, IMessage
A message type used to describe a single bad request field.
The reason of the field-level error. This is a constant value that
identifies the proximate cause of the field-level error. It should
uniquely identify the type of the FieldViolation within the scope of the
google.rpc.ErrorInfo.domain. This should be at most 63
characters and match a regular expression of [A-Z][A-Z0-9_]+[A-Z0-9],
which represents UPPER_SNAKE_CASE.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003e\u003ccode\u003eBadRequest.Types.FieldViolation\u003c/code\u003e is a message type for describing a single field error in a bad request, implementing interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and provides methods for object comparison, cloning, and data merging.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003eDescription\u003c/code\u003e for the error reason and \u003ccode\u003eField\u003c/code\u003e for the location of the error in the request, along with methods like \u003ccode\u003eCalculateSize\u003c/code\u003e, \u003ccode\u003eClone\u003c/code\u003e, and \u003ccode\u003eWriteTo\u003c/code\u003e for handling the message.\u003c/p\u003e\n"],["\u003cp\u003eThe class features \u003ccode\u003eDescriptionFieldNumber\u003c/code\u003e and \u003ccode\u003eFieldFieldNumber\u003c/code\u003e which are constants that denote the fields, and \u003ccode\u003eParser\u003c/code\u003e, which can parse messages of the class.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this class can be found in version \u003ccode\u003e2.15.0\u003c/code\u003e, with previous versions such as \u003ccode\u003e2.10.0\u003c/code\u003e and \u003ccode\u003e2.2.0\u003c/code\u003e also available.\u003c/p\u003e\n"]]],[],null,["# Class BadRequest.Types.FieldViolation (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types.FieldViolation)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Rpc.BadRequest.Types.FieldViolation)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Rpc.BadRequest.Types.FieldViolation)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Rpc.BadRequest.Types.FieldViolation) \n\n public sealed class BadRequest.Types.FieldViolation : IMessage\u003cBadRequest.Types.FieldViolation\u003e, IEquatable\u003cBadRequest.Types.FieldViolation\u003e, IDeepCloneable\u003cBadRequest.Types.FieldViolation\u003e, IBufferMessage, IMessage\n\nA message type used to describe a single bad request field. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e BadRequest.Types.FieldViolation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BadRequest](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types)[FieldViolation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types.FieldViolation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BadRequest](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types)[FieldViolation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types.FieldViolation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BadRequest](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types)[FieldViolation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types.FieldViolation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Rpc](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### FieldViolation()\n\n public FieldViolation()\n\n### FieldViolation(FieldViolation)\n\n public FieldViolation(BadRequest.Types.FieldViolation other)\n\nFields\n------\n\n### DescriptionFieldNumber\n\n public const int DescriptionFieldNumber = 2\n\nField number for the \"description\" field.\n\n### FieldFieldNumber\n\n public const int FieldFieldNumber = 1\n\nField number for the \"field\" field.\n\n### LocalizedMessageFieldNumber\n\n public const int LocalizedMessageFieldNumber = 4\n\nField number for the \"localized_message\" field.\n\n### ReasonFieldNumber\n\n public const int ReasonFieldNumber = 3\n\nField number for the \"reason\" field.\n\nProperties\n----------\n\n### Description\n\n public string Description { get; set; }\n\nA description of why the request element is bad.\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### Field\n\n public string Field { get; set; }\n\nA path that leads to a field in the request body. The value will be a\nsequence of dot-separated identifiers that identify a protocol buffer\nfield.\n\nConsider the following: \n\n message CreateContactRequest {\n message EmailAddress {\n enum Type {\n TYPE_UNSPECIFIED = 0;\n HOME = 1;\n WORK = 2;\n }\n\n optional string email = 1;\n repeated EmailType type = 2;\n }\n\n string full_name = 1;\n repeated EmailAddress email_addresses = 2;\n }\n\nIn this example, in proto `field` could take one of the following values:\n\n- `full_name` for a violation in the `full_name` value\n- `email_addresses[1].email` for a violation in the `email` field of the first `email_addresses` message\n- `email_addresses[3].type[2]` for a violation in the second `type` value in the third `email_addresses` message.\n\nIn JSON, the same values are represented as:\n\n- `fullName` for a violation in the `fullName` value\n- `emailAddresses[1].email` for a violation in the `email` field of the first `emailAddresses` message\n- `emailAddresses[3].type[2]` for a violation in the second `type` value in the third `emailAddresses` message.\n\n### LocalizedMessage\n\n public LocalizedMessage LocalizedMessage { get; set; }\n\nProvides a localized error message for field-level errors that is safe to\nreturn to the API consumer.\n\n### Parser\n\n public static MessageParser\u003cBadRequest.Types.FieldViolation\u003e Parser { get; }\n\n### Reason\n\n public string Reason { get; set; }\n\nThe reason of the field-level error. This is a constant value that\nidentifies the proximate cause of the field-level error. It should\nuniquely identify the type of the FieldViolation within the scope of the\ngoogle.rpc.ErrorInfo.domain. This should be at most 63\ncharacters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,\nwhich represents UPPER_SNAKE_CASE.\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### Clone()\n\n public BadRequest.Types.FieldViolation Clone()\n\n### Equals(FieldViolation)\n\n public bool Equals(BadRequest.Types.FieldViolation other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### MergeFrom(FieldViolation)\n\n public void MergeFrom(BadRequest.Types.FieldViolation other)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]