Search Results for

    Show / Hide Table of Contents
    View Source

    Class PropertyValidationService

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Services
    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
    Type Name Description
    PropertyEditorCollection propertyEditors
    IDataTypeService dataTypeService
    ILocalizedTextService textService
    IValueEditorCache valueEditorCache

    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
    Type Name Description
    IContent content
    IProperty[] invalidProperties
    CultureImpact impact
    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>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • PropertyValidationService(PropertyEditorCollection, IDataTypeService, ILocalizedTextService, IValueEditorCache)
    • Methods
      • IsPropertyDataValid(IContent, out IProperty[], CultureImpact)
      • IsPropertyValid(IProperty, String, String)
      • ValidatePropertyValue(IPropertyType, Object)
      • ValidatePropertyValue(IDataEditor, IDataType, Object, Boolean, String, String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX