ValidationRules Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Built in Edm validation rules.
public static class ValidationRules
type ValidationRules = class
Public Class ValidationRules
- Inheritance
-
ValidationRules
Fields
AnnotationInaccessibleTerm |
Validates that a vocabulary annotations term can be found through the model containing the annotation. |
BinaryTypeReferenceBinaryMaxLengthNegative |
Validates that the max length of a binary type is not negative. |
BinaryTypeReferenceBinaryUnboundedNotValidForMaxLength |
Validates that isUnbounded cannot be true if MaxLength is non-null. |
BoundOperationMustHaveParameters |
Validates that if an operation is bindable, it must have non-optional parameters. |
CollectionExpressionAllElementsCorrectType |
Validates that all properties of a collection expression are of the correct type. |
DecimalTypeReferencePrecisionOutOfRange |
Validates that the precision is between 0 and the max precision of the decimal type. |
DecimalTypeReferenceScaleOutOfRange |
Validates that the scale is between 0 and the precision of the decimal type. |
DirectValueAnnotationHasXmlSerializableName |
Validates that the name of a direct annotation can safely be serialized as XML. |
ElementDirectValueAnnotationFullNameMustBeUnique |
Validates that no direct annotations share the same name and namespace. |
EntityContainerDuplicateEntityContainerMemberName |
Validates that there are no duplicate names in an entity container. |
EntityContainerElementMustNotHaveKindOfNone |
An entity container element without other errors must not have kind of none. |
EntityReferenceTypeInaccessibleEntityType |
Validates that the entity type wrapped in this entity reference can be found through the model being validated. |
EntitySetCanOnlyBeContainedByASingleNavigationProperty |
Validates that an entity set can only have a single navigation property targeting it that has Contains set to true. |
EntitySetRecursiveNavigationPropertyMappingsMustPointBackToSourceEntitySet |
Validates that if a navigation property mapping is of recursive containment, the mapping points back to the source entity set. |
EntitySetTypeCannotBeEdmEntityType |
Validates that the type of an entity set cannot be Edm.EntityType. |
EntitySetTypeMustBeCollectionOfEntityType |
Validates that the type of entity set is collection of entity type. |
EntityTypeBoundEscapeFunctionMustBeUnique |
Validates that the escape functions are unique. |
EntityTypeDuplicatePropertyNameSpecifiedInEntityKey |
Validates that there are not duplicate properties in an entity key. |
EntityTypeEntityKeyMustBeScalar |
Validates that all parts of an entity key are scalar. |
EntityTypeInvalidKeyKeyDefinedInBaseClass |
Validates that a key is not defined if there is already a key in the base type. |
EntityTypeInvalidKeyNullablePart |
Validates that no part of an entity key is nullable. |
EntityTypeKeyMissingOnEntityType |
Validates that the entity type has a key. |
EntityTypeKeyPropertyMustBelongToEntity |
Validates that all properties in the key of an entity blong to that entity. |
EntityTypeKeyTypeCannotBeEdmPrimitiveType |
Validates that Edm.PrimitiveType cannot be used as the type of a key property of an entity type. |
EnumMemberValueMustHaveSameTypeAsUnderlyingType |
Raises an error if the type of an enum member doesn't match the underlying type of the enum it belongs to. |
EnumMustHaveIntegerUnderlyingType |
Raises an error if the underlying type of an enum type is not an integer type. |
EnumTypeEnumMemberNameAlreadyDefined |
Validates that there are not duplicate enum members in an enum. |
EnumUnderlyingTypeCannotBeEdmPrimitiveType |
Validates that the underlying type of a type definition cannot be Edm.PrimitiveType. |
FunctionApplicationExpressionParametersMatchAppliedFunction |
Validates the types of a function application are correct. |
FunctionImportWithParameterShouldNotBeIncludedInServiceDocument |
Validates that the function import included in service document must not have parameters. |
FunctionMustHaveReturnType |
Validates that if a function, it must have a return type. |
FunctionWithUrlEscapeFunctionMustBeBound |
Validates that if a bound function has Org.OData.Community.V1.UrlEscapeFunction annotation, it must be bound function. |
FunctionWithUrlEscapeFunctionMustHaveOneStringParameter |
Validates that if a bound function has Org.OData.Community.V1.UrlEscapeFunction annotation, it must have only one string parameter. |
IfExpressionAssertCorrectTestType |
Validates that an if expression has a boolean condition. |
ImmediateValueAnnotationElementAnnotationHasNameAndNamespace |
Validates that an immediate annotation that is flagged to be serialized as an element can be serialized safely. |
ImmediateValueAnnotationElementAnnotationIsValid |
Validates that an immediate annotation has a name and a namespace. |
ModelBoundFunctionOverloadsMustHaveSameReturnType |
Validates all function overloads with the same name have the same returntype. |
ModelDuplicateEntityContainerName |
Validates that there are not duplicate properties in an entity key. |
ModelDuplicateSchemaElementName |
Validates every schema element in the current model is unique across all referenced models. |
NamedElementNameIsNotAllowed |
Validates that an element name matches the allowed pattern of names according to the CSDL spec. |
NamedElementNameIsTooLong |
Validates that an element name is not too long according to the CSDL spec. |
NamedElementNameMustNotBeEmptyOrWhiteSpace |
Validates that a name is not empty or whitespace. |
NavigationMappingMustBeBidirectional |
Validates that if a navigation property is traversed to another entity set/singleton, and then the navigation properties partner is traversed, the destination will be the source entity set/singleton. |
NavigationPropertyBindingPathMustBeResolvable |
Validates that the binding path of navigation property must be resolved to a valid path, that is: Each segments in path must be defined, and inner path segments can only be complex or containment, and last path segment must be the navigation property name. |
NavigationPropertyCorrectType |
Validates that the type of a navigation property corresponds to the other end of the association and the multiplicity of the other end. |
NavigationPropertyDependentEndMultiplicity |
Validates that if the dependent properties are equivalent to the key of the dependent entity, the multiplicity of the dependent entity cannot be 1 Validates multiplicity of the dependent entity according to the following rules: 0..1, 1 - if dependent properties represent the dependent entity key. * - if dependent properties don't represent the dependent entity key. |
NavigationPropertyDependentPropertiesMustBelongToDependentEntity |
Validates that all dependent properties of a navigation property belong to the dependent entity type. |
NavigationPropertyDuplicateDependentProperty |
Validates that the dependent properties of a navigation property contain no duplicates. |
NavigationPropertyEndWithManyMultiplicityCannotHaveOperationsSpecified |
Validates that the navigation property does not have both a multiplicity of many and an OnDelete operation. |
NavigationPropertyEntityMustNotIndirectlyContainItself |
Validates that if an entity does not directly contain itself, it cannot contain itself through a containment loop. |
NavigationPropertyInvalidOperationMultipleEndsInAssociatedNavigationProperties |
Validates that only one end of an association has an OnDelete operation. |
NavigationPropertyMappingMustPointToValidTargetForProperty |
Validates that the target of a navigation property mapping is valid for the target type of the property. |
NavigationPropertyMappingsMustBeUnique |
Validates that no navigation property is mapped multiple times for a single path. |
NavigationPropertyPartnerPathShouldBeResolvable |
Validates that the navigation property partner path, if exists, should be resolvable to a navigation property. |
NavigationPropertyPrincipalEndMultiplicity |
Validates multiplicity of the principal end: 0..1 - if some dependent properties are nullable, 1 - if some dependent properties are not nullable.
|
NavigationPropertyTypeCannotHavePathTypeProperty |
Validates that the type of the navigation property cannot have path type property defined. |
NavigationPropertyTypeMismatchRelationshipConstraint |
Validates that each pair of properties between the dependent properties and the principal properties are of the same type. |
NavigationPropertyWithNonRecursiveContainmentSourceMustBeFromOne |
Validates that if a navigation property has ContainsTarget = true and the target entity type is defferent than the declaring type of the property, then the multiplicity of the source of navigation is One. |
NavigationPropertyWithRecursiveContainmentSourceMustBeFromZeroOrOne |
Validates that if a navigation property has ContainsTarget = true and the target entity type is the same as the declaring type of the property, then the multiplicity of the source of navigation is Zero-Or-One. This depends on there being a targetting cycle. Because of the rule NavigationMappingMustBeBidirectional, we know that either this is always true, or there will be an error |
NavigationPropertyWithRecursiveContainmentTargetMustBeOptional |
Validates that if a navigation property has ContainsTarget = true and the target entity type is the same as the declaring type of the property, then the multiplicity of the target of navigation is 0..1 or Many. This depends on there being a targetting cycle. Because of the rule NavigationMappingMustBeBidirectional, we know that either this is always true, or there will be an error |
NavigationSourceDeclaringTypeCannotHavePathTypeProperty |
Validates that there is no entity set or singleton whose entity type has not property defined with Path type. |
NavigationSourceInaccessibleEntityType |
Validates that the entity type of an entity set or singleton can be found from the model being validated. |
NavigationSourceTypeHasNoKeys |
Validates that there is no entity set or singleton whose entity type has no key. |
OpenComplexTypeCannotHaveClosedDerivedComplexType |
Validates that a open complex type can not have closed derived complex type. |
OperationEntitySetPathMustBeValid |
Validates that if a operationImport is bindable, it must have parameters. |
OperationImportCannotImportBoundOperation |
Validates that if an operation import cannot import an operation that is bound. |
OperationImportEntitySetExpressionIsInvalid |
Validates that the entity set of a operation import is defined using a path or an entity set reference expression. |
OperationImportEntityTypeDoesNotMatchEntitySet |
Validates that the return type of a operation import must match the type of the entity set of the function. |
OperationParameterNameAlreadyDefinedDuplicate |
Validates that a operation does not have multiple parameters with the same name. |
OperationReturnTypeCannotBeCollectionOfAbstractType |
Validates that the return type cannot be Collection(Edm.PrimitiveType) or Collection(Edm.ComplexType). |
OperationReturnTypeEntityTypeMustBeValid |
Validates that the return type is consistent with the entityset path if it exists. |
OperationUnsupportedReturnType |
Validates that a operation import has an allowed return type. |
OptionalParametersMustComeAfterRequiredParameters |
Validates optional parameters must come before required parameters. |
PrimitiveTypeMustNotHaveKindOfNone |
A primtive type without other errors must not have kind of none. |
PrimitiveValueValidForType |
Validates that if a primitive value declares a type, the value is acceptable for the type. |
PropertyMustNotHaveKindOfNone |
A property without other errors must not have kind of none. |
PropertyTypeCannotBeCollectionOfAbstractType |
Collection(Edm.PrimitiveType) and Collection(Edm.ComplexType) cannot be used as the type of a property. |
PropertyValueBindingValueIsCorrectType |
Validates that the value of a property value binding is the correct type. |
RecordExpressionPropertiesMatchType |
Validates that if a value record expression declares a type, the property types are correct. |
SchemaElementMustNotHaveKindOfNone |
A schema element without other errors must not have kind of none. |
SchemaElementNamespaceIsNotAllowed |
Validates that an element namespace matches the allowed pattern of namespaces according to the CSDL spec. |
SchemaElementNamespaceIsTooLong |
Validates that an element namespace is not too long according to the CSDL spec. |
SchemaElementNamespaceMustNotBeEmptyOrWhiteSpace |
Validates that an element namespace is not empty or whitespace. |
SchemaElementSystemNamespaceEncountered |
Validates that an element namespace is not a reserved system namespace. |
SingletonTypeCannotBeEdmEntityType |
Validates that the type of singleton cannot be Edm.EntityType. |
SingletonTypeMustBeEntityType |
Validates that the type of singleton is entity type. |
StringTypeReferenceStringMaxLengthNegative |
Validates that the max length of a string is not negative. |
StringTypeReferenceStringUnboundedNotValidForMaxLength |
Validates that IsUnbounded cannot be true if MaxLength is non-null. |
StructuralPropertyInvalidPropertyType |
Validates that the property is of an allowed type. |
StructuredTypeBaseTypeCannotBeAbstractType |
Validates that the base type of a structured type cannot be Edm.EntityType or Edm.ComplexType. |
StructuredTypeBaseTypeMustBeSameKindAsDerivedKind |
Validates that the base type of a complex type is complex, and the base type of an entity type is an entity. |
StructuredTypeInaccessibleBaseType |
Validates that the base type of a structured type can be found from the model being validated. |
StructuredTypeInvalidMemberNameMatchesTypeName |
Validates that a type does not have a property with the same name as that type. |
StructuredTypePropertiesDeclaringTypeMustBeCorrect |
Validates that the declaring type of a property contains that property. |
StructuredTypePropertyNameAlreadyDefined |
Validates that there are not duplicate properties in a type. |
TemporalTypeReferencePrecisionOutOfRange |
Validates that the precision is between 0 and the max precision of the temporal type. |
TypeDefinitionUnderlyingTypeCannotBeEdmPrimitiveType |
Validates that the underlying type of a type definition cannot be Edm.PrimitiveType. |
TypeMustNotHaveKindOfNone |
A type without other errors must not have kind of none. |
TypeReferenceInaccessibleSchemaType |
Validates that a type reference refers to a type that can be found through the model being validated. |
UnBoundFunctionOverloadsMustHaveIdenticalReturnTypes |
Validates that all function overloads have the same return types. |
VocabularyAnnotatableNoDuplicateAnnotations |
Validates that there are no annotations that share the same term and qualifier. |
VocabularyAnnotationAssertCorrectExpressionType |
Validates that if a vocabulary annotation declares a type, the expression for that annotation has the correct type. |
VocabularyAnnotationInaccessibleTarget |
Validates that a vocabulary annotations target can be found through the model containing the annotation. |
VocabularyAnnotationTargetAllowedApplyToElement |
Validates that a vocabulary annotations target can be allowed in the AppliesTo of the term. |