You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, we support the skipped standard constraint on message fields to skip any validation constraints applied to the underlying type. This is currently an all or nothing scenario, when perhaps it's desired to opt-out of one or a few of the message's fields.
Potentially, we can support this via a skipped_fields constraint which takes a FieldMask and can specify which not to evaluate.
Problem it solves or use case:
Example use-case where a message describing a resource elided a constraint for a field and had the RPC request object use a CEL expression to validate that nested field.
In the example above, Foo by itself will verify the value of the id field to be a UUID and the data field to be of a minimum length. However, if validate is called on a Bar containing a Foo, only the data field will be evaluated as id has been skipped.
The text was updated successfully, but these errors were encountered:
Feature description:
Today, we support the
skipped
standard constraint on message fields to skip any validation constraints applied to the underlying type. This is currently an all or nothing scenario, when perhaps it's desired to opt-out of one or a few of the message's fields.Potentially, we can support this via a
skipped_fields
constraint which takes aFieldMask
and can specify which not to evaluate.Problem it solves or use case:
Example use-case where a message describing a resource elided a constraint for a field and had the RPC request object use a CEL expression to validate that nested field.
Proposed implementation or solution:
In the example above,
Foo
by itself will verify the value of theid
field to be a UUID and thedata
field to be of a minimum length. However, if validate is called on aBar
containing aFoo
, only thedata
field will be evaluated asid
has been skipped.The text was updated successfully, but these errors were encountered: