Skip to content

Parameters

Definition

<validator name="..." ...>
Attribute Type Description
name string Required. This CamelCased name is the name of the validator, and will be reflected in the move generated when validation fails.

Parents

Children

None

Behaviour

The validator will accept the configuration, if all the propostions in the configuration has the prescribed value. The configuration will only be tried if there exists propositions for all predicates in the configuration. If validation fails, TDM will generate an "icm:acc*neg:rejected(set([<propositions>]), <ValidityName>).

Examples

This validator only accepts Karlstad as the destination for any travel.

  <validator name="DestinationValidity">
    <configuration>
        <proposition predicate="destination" value="Karltdad"/>
    </configuration>
  </validator>
A attempt to accept the proposition destination(Ibiza) would result in the following icm: "icm:acc*neg:rejected(set([destination(Ibiza))]), DestinationValidity)


Last update: February 4, 2023