Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 3.88 KB

Org.OData.Validation.V1.md

File metadata and controls

40 lines (30 loc) · 3.88 KB

Validation Vocabulary

Namespace: Org.OData.Validation.V1

Terms describing validation rules

Term Type Description
Pattern String The pattern that a string property, parameter, or term must match. This SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect.
Minimum Decimal Minimum value that a property, parameter, or term can have.
Maximum Decimal Maximum value that a property, parameter, or term can have.
Exclusive Tag Tags a Minimum or Maximum as exclusive, i.e. an open interval boundary.
AllowedValues [AllowedValue] A collection of valid values for the annotated property, parameter, or type definition
MultipleOf Decimal The value of the annotated property, parameter, or term must be an integer multiple of this positive value. For temporal types, the value is measured in seconds.
Constraint ConstraintType Condition that the annotation target has to fulfill
ItemsOf [ItemsOfType] A list of constraints describing that entities related via one navigation property MUST also be related via another, collection-valued navigation property. The same path value MUST NOT occur more than once.

Example: entity type Customer has navigation properties AllOrders, OpenOrders, and ClosedOrders. The term allows to express that items of OpenOrders and ClosedOrders are also items of the AllOrders navigation property, even though they are defined in an Orders entity set.

OpenPropertyTypeConstraint [QualifiedTypeName] Dynamic properties added to the annotated open structured type are restricted to the listed types
DerivedTypeConstraint [QualifiedTypeName] Values are restricted to types derived from the declared type and listed in this collection

Types listed in this collection that are not derived form the declared type of the annotated model element are ignored

Property Type Description
Value PrimitiveType An allowed value for the property, parameter, or type definition
Property Type Description
FailureMessage String Human-readable message that can be shown to end users if the constraint is not fulfilled
Condition Boolean Value MUST be a dynamic expression that evaluates to true if and only if the constraint is fulfilled

Entities related via the single- or collection-valued navigation property identified by path are also related via the collection-valued navigation property identified by target.

Property Type Description
path NavigationPropertyPath A path to a single- or collection-valued navigation property
target NavigationPropertyPath A path to a collection-valued navigation property