View Source
Interface IPropertyValidationService
Assembly: Umbraco.Core.dll
Syntax
public interface IPropertyValidationService
Methods
View Source
IsPropertyDataValid(IContent, out IProperty[], CultureImpact)
Validates the content item's properties pass validation rules
Declaration
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
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
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
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> |
|