Search Results for

    Show / Hide Table of Contents
    View Source

    Class ComplexEditorValidator

    Used to validate complex editors that contain nested editors

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.PropertyEditors
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public abstract class ComplexEditorValidator : IValueValidator

    Constructors

    View Source

    ComplexEditorValidator(IPropertyValidationService)

    Initializes a new instance of the ComplexEditorValidator class with the specified property validation service.

    Declaration
    public ComplexEditorValidator(IPropertyValidationService propertyValidationService)
    Parameters
    Type Name Description
    IPropertyValidationService propertyValidationService

    An instance of IPropertyValidationService used to validate properties.

    Methods

    View Source

    GetElementTypeValidation(object?, PropertyValidationContext)

    Declaration
    protected abstract IEnumerable<ComplexEditorValidator.ElementTypeValidationModel> GetElementTypeValidation(object? value, PropertyValidationContext validationContext)
    Parameters
    Type Name Description
    object value
    PropertyValidationContext validationContext
    Returns
    Type Description
    IEnumerable<ComplexEditorValidator.ElementTypeValidationModel>
    View Source

    GetNestedValidationResults(IEnumerable<ElementTypeValidationModel>, PropertyValidationContext)

    Return a nested validation result per row (Element Type)

    Declaration
    protected IEnumerable<NestedValidationResults> GetNestedValidationResults(IEnumerable<ComplexEditorValidator.ElementTypeValidationModel> elements, PropertyValidationContext validationContext)
    Parameters
    Type Name Description
    IEnumerable<ComplexEditorValidator.ElementTypeValidationModel> elements
    PropertyValidationContext validationContext
    Returns
    Type Description
    IEnumerable<NestedValidationResults>
    View Source

    Validate(object?, string?, object?, PropertyValidationContext)

    Validates a value.

    Declaration
    public IEnumerable<ValidationResult> Validate(object? value, string? valueType, object? dataTypeConfiguration, PropertyValidationContext validationContext)
    Parameters
    Type Name Description
    object value

    The value to validate.

    string valueType

    The value type.

    object dataTypeConfiguration

    A datatype configuration.

    PropertyValidationContext validationContext

    The context in which the value is being validated.

    Returns
    Type Description
    IEnumerable<ValidationResult>

    Validation results.

    Remarks

    The value can be a string, a Json structure (JObject, JArray...)... corresponding to what was posted by an editor.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX