[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-1082) Add term Constraint to Validation vocabulary
[ https://issues.oasis-open.org/browse/ODATA-1082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Pizzo updated ODATA-1082: --------------------------------- Proposal: Add new term <Term Name="Constraint" Type="Validation.ConstraintType" AppliesTo="Property EntityType ComplexType"> <Annotation Term="Core.Description" String="Condition that the annotation target has to fulfill" /> </Term> <ComplexType Name="ConstraintType"> <Property Name="FailureMessage" Type="Edm.String" Nullable="true"> <Annotation Term="Core.IsLanguageDependent" /> </Property> <Property Name="Condition" Type="Edm.Boolean" Nullable="false"> <Annotation Term="Core.Description" String="Value MUST be a dynamic expression that evaluates to true if and only if the constraint is fulfilled" /> </Property> </ComplexType> Example: <Annotation Term="Validation.Constraint" Qualifier="Comparison"> <Record> <PropertyValue Property="FailureMessage" String="Start date cannot be after end date" /> <PropertyValue Property="Condition"> <Le> <Path>StartDate</Path> <Path>EndDate</Path> </Le> </PropertyValue> </Record> </Annotation> was: Add new term <Term Name="Constraint" Type="Validation.ConstraintType" AppliesTo="Property EntityType ComplexType"> <Annotation Term="Core.Description" String="Condition that the annotation target has to fulfill" /> </Term> <ComplexType Name="ConstraintType"> <Property Name="FailureMessage" Type="Edm.String" Nullable="true"> <Annotation Term="Core.IsLanguageDependent" /> </Property> <Property Name="Condition" Type="Edm.Boolean"> <Annotation Term="Core.Description" String="Value MUST be a dynamic expression that evaluates to true if and only if the constraint is fulfilled" /> </Property> </ComplexType> Example: <Annotation Term="Validation.Constraint" Qualifier="Comparison"> <Record> <PropertyValue Property="FailureMessage" String="Start date cannot be after end date" /> <PropertyValue Property="Condition"> <Le> <Path>StartDate</Path> <Path>EndDate</Path> </Le> </PropertyValue> </Record> </Annotation> > Add term Constraint to Validation vocabulary > -------------------------------------------- > > Key: ODATA-1082 > URL: https://issues.oasis-open.org/browse/ODATA-1082 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: New Feature > Components: Vocabularies > Affects Versions: V4.0_CSD01 > Environment: Proposed > Reporter: Ralf Handl > Fix For: V4.0_CSD02 > > > Communicating validation rules to the clients helps reduce the number of failed requests in API as well as UI scenarios. > Besides the elementary rules Minimum, Maximum, Pattern, ... it would be helpful to allow expressing more complicated validation rules that involve logical and arithmetic expressions. -- This message was sent by Atlassian JIRA (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]