View Source
Class PropertyValidationService
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public class PropertyValidationService : IPropertyValidationService
Constructors
View Source
PropertyValidationService(PropertyEditorCollection, IDataTypeService, ILocalizedTextService, IValueEditorCache)
Declaration
public PropertyValidationService(PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, ILocalizedTextService textService, IValueEditorCache valueEditorCache)
Parameters
Methods
View Source
IsPropertyDataValid(IContent, out IProperty[], CultureImpact)
Validates the content item's properties pass validation rules
Declaration
public bool IsPropertyDataValid(IContent content, out IProperty[] invalidProperties, CultureImpact impact)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
IsPropertyValid(IProperty, String, String)
Gets a value indicating whether the property has valid values.
Declaration
public bool IsPropertyValid(IProperty property, string culture = "*", string segment = "*")
Parameters
Type |
Name |
Description |
IProperty |
property |
|
System.String |
culture |
|
System.String |
segment |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
ValidatePropertyValue(IPropertyType, Object)
Validates a property value.
Declaration
public IEnumerable<ValidationResult> ValidatePropertyValue(IPropertyType propertyType, object postedValue)
Parameters
Type |
Name |
Description |
IPropertyType |
propertyType |
|
System.Object |
postedValue |
|
Returns
Type |
Description |
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> |
|
View Source
ValidatePropertyValue(IDataEditor, IDataType, Object, Boolean, String, String, String)
Validates a property value.
Declaration
public IEnumerable<ValidationResult> ValidatePropertyValue(IDataEditor editor, IDataType dataType, object postedValue, bool isRequired, string validationRegExp, string isRequiredMessage, string validationRegExpMessage)
Parameters
Type |
Name |
Description |
IDataEditor |
editor |
|
IDataType |
dataType |
|
System.Object |
postedValue |
|
System.Boolean |
isRequired |
|
System.String |
validationRegExp |
|
System.String |
isRequiredMessage |
|
System.String |
validationRegExpMessage |
|
Returns
Type |
Description |
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> |
|