Skip to content

Service Interface validators

A Service Interface <validator> calls an external operation to check whether supplied parameter values are valid.

<validator name="CityValidity">
  <parameters><parameter predicate="destination" format="value"/></parameters>
  <target><http endpoint="https://service.example/city-validity"/></target>
</validator>

It requires parameters and target children and uses an HTTP target in Tala 31.0.1. This operation is distinct from a domain validator, which lists valid proposition configurations inside the DDD.

The target returns an is_valid Boolean. If it returns false, the runtime rejects the input and reports the validation failure. Include the parameter values needed by the service in the validator's parameters section.

See Parameters and Targets.