Required Field
A message option that defines a combination of required fields for the message.
The fields are separated with a |
symbol and combined with a &
symbol.
Example:
message PersonName {
option (required_field) = "given_name|honorific_prefix & family_name";
string honorific_prefix = 1;
string given_name = 2;
string middle_name = 3;
}
Content copied to clipboard
The PersonName
message is valid against the RequiredField
either if it has a non-default family name, or both honorific prefix and a family name.