Search Results for

    Show / Hide Table of Contents
    View Source

    Class BlockEditorValidator<TValue, TLayout>

    Provides validation logic for block editor property values and their layouts in Umbraco.

    Inheritance
    object
    ComplexEditorValidator
    BlockEditorValidatorBase<TValue, TLayout>
    Namespace: Umbraco.Cms.Core.PropertyEditors
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class BlockEditorValidator<TValue, TLayout> : BlockEditorValidatorBase<TValue, TLayout>, IValueValidator where TValue : BlockValue<TLayout>, new() where TLayout : class, IBlockLayoutItem, new()
    Type Parameters
    Name Description
    TValue

    The type representing the value of the block editor.

    TLayout

    The type representing the layout structure of the block editor.

    Constructors

    View Source

    BlockEditorValidator(IPropertyValidationService, BlockEditorValues<TValue, TLayout>, IBlockEditorElementTypeCache)

    Initializes a new instance of the BlockEditorValidator<TValue, TLayout> class.

    Declaration
    public BlockEditorValidator(IPropertyValidationService propertyValidationService, BlockEditorValues<TValue, TLayout> blockEditorValues, IBlockEditorElementTypeCache elementTypeCache)
    Parameters
    Type Name Description
    IPropertyValidationService propertyValidationService

    The service used to validate property values within the block editor.

    BlockEditorValues<TValue, TLayout> blockEditorValues

    The values representing the block editor's data and layout.

    IBlockEditorElementTypeCache elementTypeCache

    The cache for block editor element types to optimize lookups.

    Methods

    View Source

    GetElementTypeValidation(object?, PropertyValidationContext)

    Declaration
    protected override IEnumerable<ComplexEditorValidator.ElementTypeValidationModel> GetElementTypeValidation(object? value, PropertyValidationContext validationContext)
    Parameters
    Type Name Description
    object value
    PropertyValidationContext validationContext
    Returns
    Type Description
    IEnumerable<ComplexEditorValidator.ElementTypeValidationModel>
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX