Skip to content

validateImmutableFields

validateImmutableFields(schema, message, opts?): void

Defined in: immutable.ts:33

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://google.aip.dev/203

DescMessage

Message<string>

ValidateImmutableFieldsOptions

void