Skip to content

validateImmutableFields

validateImmutableFields(schema, message, opts?): void

Defined in: packages/aip/src/fieldbehavior/immutable.ts:30

Throws a validation error if the message contains a field that is immutable and a change to an immutable field is requested. This can be used when validating update requests and want to return INVALID_ARGUMENT to the user.

If a fieldMask is provided, only fields in the mask are checked. Otherwise, all fields are checked.

See: https://aip.dev/203

DescMessage

Message<string>

ValidateImmutableFieldsOptions

void