Get desktop application:
View/edit binary Protocol Buffers messages
AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type
Used in:
Required specifies that this field must be set
In specifies that this field's `type_url` must be equal to one of the specified values.
NotIn specifies that this field's `type_url` must not be equal to any of the specified values.
BoolRules describes the constraints applied to `bool` values
Used in:
Const specifies that this field must be exactly the specified value
BytesRules describe the constraints applied to `bytes` values
Used in:
Const specifies that this field must be exactly the specified value
Len specifies that this field must be the specified number of bytes
MinLen specifies that this field must be the specified number of bytes at a minimum
MaxLen specifies that this field must be the specified number of bytes at a maximum
Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
Prefix specifies that this field must have the specified bytes at the beginning of the string.
Suffix specifies that this field must have the specified bytes at the end of the string.
Contains specifies that this field must have the specified bytes anywhere in the string.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
WellKnown rules provide advanced constraints against common byte patterns
Ip specifies that the field must be a valid IP (v4 or v6) address in byte format
Ipv4 specifies that the field must be a valid IPv4 address in byte format
Ipv6 specifies that the field must be a valid IPv6 address in byte format
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
DoubleRules describes the constraints applied to `double` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type
Used in:
Required specifies that this field must be set
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lt specifies that this field must be less than the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive
Gte specifies that this field must be greater than the specified value, inclusive
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
EnumRules describe the constraints applied to enum values
Used in:
Const specifies that this field must be exactly the specified value
DefinedOnly specifies that this field must be only one of the defined values for this enum, failing on any undefined value.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
FieldRules encapsulates the rules for each type of field. Depending on the field, the correct set should be used to ensure proper validations.
Used in:
,Scalar Field Types
Complex Field Types
Well-Known Field Types
Fixed32Rules describes the constraints applied to `fixed32` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
Fixed64Rules describes the constraints applied to `fixed64` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
FloatRules describes the constraints applied to `float` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
Int32Rules describes the constraints applied to `int32` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
Int64Rules describes the constraints applied to `int64` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
WellKnownRegex contain some well-known patterns.
Used in:
HTTP header name as defined by RFC 7230.
HTTP header value as defined by RFC 7230.
MapRules describe the constraints applied to `map` values
Used in:
MinPairs specifies that this field must have the specified number of KVs at a minimum
MaxPairs specifies that this field must have the specified number of KVs at a maximum
NoSparse specifies values in this field cannot be unset. This only applies to map's with message value types.
Keys specifies the constraints to be applied to each key in the field.
Values specifies the constraints to be applied to the value of each key in the field. Message values will still have their validations evaluated unless skip is specified here.
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
MessageRules describe the constraints applied to embedded message values. For message-type fields, validation is performed recursively.
Used in:
Skip specifies that the validation rules of this field should not be evaluated
Required specifies that this field must be set
RepeatedRules describe the constraints applied to `repeated` values
Used in:
MinItems specifies that this field must have the specified number of items at a minimum
MaxItems specifies that this field must have the specified number of items at a maximum
Unique specifies that all elements in this field must be unique. This contraint is only applicable to scalar and enum types (messages are not supported).
Items specifies the contraints to be applied to each item in the field. Repeated message fields will still execute validation against each item unless skip is specified here.
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
SFixed32Rules describes the constraints applied to `sfixed32` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
SFixed64Rules describes the constraints applied to `sfixed64` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
SInt32Rules describes the constraints applied to `sint32` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
SInt64Rules describes the constraints applied to `sint64` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
StringRules describe the constraints applied to `string` values
Used in:
Const specifies that this field must be exactly the specified value
Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string.
MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string.
MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string.
LenBytes specifies that this field must be the specified number of bytes
MinBytes specifies that this field must be the specified number of bytes at a minimum
MaxBytes specifies that this field must be the specified number of bytes at a maximum
Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
Prefix specifies that this field must have the specified substring at the beginning of the string.
Suffix specifies that this field must have the specified substring at the end of the string.
Contains specifies that this field must have the specified substring anywhere in the string.
NotContains specifies that this field cannot have the specified substring anywhere in the string.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
WellKnown rules provide advanced constraints against common string patterns
Email specifies that the field must be a valid email address as defined by RFC 5322
Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs).
Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets.
Ipv4 specifies that the field must be a valid IPv4 address.
Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets.
Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986
UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.
Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).
Uuid specifies that the field must be a valid UUID as defined by RFC 4122
WellKnownRegex specifies a common well known pattern defined as a regex.
This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation. By default, this is true, and HTTP header validations are RFC-compliant. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules.
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type
Used in:
Required specifies that this field must be set
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive
Gte specifies that this field must be greater than the specified value, inclusive
LtNow specifies that this must be less than the current time. LtNow can only be used with the Within rule.
GtNow specifies that this must be greater than the current time. GtNow can only be used with the Within rule.
Within specifies that this field must be within this duration of the current time. This constraint can be used alone or with the LtNow and GtNow rules.
UInt32Rules describes the constraints applied to `uint32` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
UInt64Rules describes the constraints applied to `uint64` values
Used in:
Const specifies that this field must be exactly the specified value
Lt specifies that this field must be less than the specified value, exclusive
Lte specifies that this field must be less than or equal to the specified value, inclusive
Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
In specifies that this field must be equal to one of the specified values
NotIn specifies that this field cannot be equal to one of the specified values
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty