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
The (validate) option does nested validation of message fields. An additional feature of this option is that it can unpack the message if the field type is Any. It tries to find a Java class for the given Any, unpack if found, and invoke validate() if the unpacked object implements ValidatableMessage.
The problem is that the ConstraintViolation instance has no place where to put the name of the unpacked type.
Currently, we fill in two fields:
typeName - the root type that triggered validation.
fieldPath – the path to the invalid field relatively to the typeName.
An example of the failing validation with Any:
io.spine.validate.ValidationException: ValidationException: At `spine.server.dispatch.InboxAddresses`:
At `id.simple_name`: The field `spine.server.dispatch.InboxAddresses.id.simple_name` of the type `string` must have a non-default value.
In this example, spine.server.dispatch.InboxAddresses.id.simple_name is the failed field, where spine.server.dispatch.InboxAddresses.id is Any. So, it is not clear what type had the invalid simple_name field.
The text was updated successfully, but these errors were encountered:
The
(validate)
option does nested validation of message fields. An additional feature of this option is that it can unpack the message if the field type isAny
. It tries to find a Java class for the givenAny
, unpack if found, and invokevalidate()
if the unpacked object implementsValidatableMessage
.The problem is that the
ConstraintViolation
instance has no place where to put the name of the unpacked type.Currently, we fill in two fields:
typeName
- the root type that triggered validation.fieldPath
– the path to the invalid field relatively to thetypeName
.An example of the failing validation with
Any
:In this example,
spine.server.dispatch.InboxAddresses.id.simple_name
is the failed field, wherespine.server.dispatch.InboxAddresses.id
isAny
. So, it is not clear what type had the invalidsimple_name
field.The text was updated successfully, but these errors were encountered: