StringRules describe the constraints applied to string
values
StringRules describe the constraints applied to string
values
- Value Params
- const
Const specifies that this field must be exactly the specified value
- contains
Contains specifies that this field must have the specified substring anywhere in the string.
- in
In specifies that this field must be equal to one of the specified values
- len
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.
- lenBytes
LenBytes specifies that this field must be the specified number of bytes at a minimum
- maxBytes
MaxBytes specifies that this field must be the specified number of bytes at a maximum
- maxLen
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.
- minBytes
MinBytes specifies that this field must be the specified number of bytes at a minimum
- minLen
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.
- notContains
NotContains specifies that this field cannot have the specified substring anywhere in the string.
- notIn
NotIn specifies that this field cannot be equal to one of the specified values
- pattern
Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
- prefix
Prefix specifies that this field must have the specified substring at the beginning of the string.
- strict
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 &92;r&92;n&92;0 characters, which can be used to bypass header matching rules.
- suffix
Suffix specifies that this field must have the specified substring at the end of the string.
- Companion
- object
Value members
Concrete methods
Inherited methods
Serializes the messgae and returns a byte array containing its raw bytes
Serializes the messgae and returns a byte array containing its raw bytes
- Inherited from
- GeneratedMessage
Serializes the messgae and returns a ByteString containing its raw bytes
Serializes the messgae and returns a ByteString containing its raw bytes
- Inherited from
- GeneratedMessage