Class RequiredPropertyValidator
Validates that all required properties are set.
Inheritance
System.Object
RequiredPropertyValidator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Validation
Assembly: EPiServer.dll
Version: 9.12.2Syntax
[ServiceConfiguration]
public class RequiredPropertyValidator : IValidate<IContentData>, IValidate
Constructors
RequiredPropertyValidator(LocalizationService, IPropertyDefinitionRepository, IContentTypeRepository)
Initializes a new instance of the RequiredPropertyValidator class.
Declaration
public RequiredPropertyValidator(LocalizationService localizationService, IPropertyDefinitionRepository propertyDefinitionRepository, IContentTypeRepository contentTypeRepository)
Parameters
Type | Name | Description |
---|---|---|
LocalizationService | localizationService | The localization service. |
IPropertyDefinitionRepository | propertyDefinitionRepository | The property definition repository. |
IContentTypeRepository | contentTypeRepository | The content type repository. |
Methods
Validate(IContentData)
Validates the specified instance.
Declaration
public IEnumerable<ValidationError> Validate(IContentData instance)
Parameters
Type | Name | Description |
---|---|---|
IContentData | instance | The instance. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ValidationError> |