Search Results for

    Show / Hide Table of Contents
    View Source

    Class PropertyValidationContext

    Represents the context for property validation, including culture and segment information.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Models.Validation
    Assembly: Umbraco.Core.dll
    Syntax
    public sealed class PropertyValidationContext

    Constructors

    View Source

    PropertyValidationContext()

    Declaration
    public PropertyValidationContext()

    Properties

    View Source

    Culture

    Gets the culture being validated, or null for invariant validation.

    Declaration
    public required string? Culture { get; init; }
    Property Value
    Type Description
    string
    View Source

    CulturesBeingValidated

    Gets the collection of cultures being validated.

    Declaration
    public required IEnumerable<string> CulturesBeingValidated { get; init; }
    Property Value
    Type Description
    IEnumerable<string>
    View Source

    Segment

    Gets the segment being validated, or null for neutral segment validation.

    Declaration
    public required string? Segment { get; init; }
    Property Value
    Type Description
    string
    View Source

    SegmentsBeingValidated

    Gets the collection of segments being validated.

    Declaration
    public required IEnumerable<string?> SegmentsBeingValidated { get; init; }
    Property Value
    Type Description
    IEnumerable<string>

    Methods

    View Source

    CultureAndSegment(string?, string?)

    Creates a property validation context for a specific culture and segment.

    Declaration
    public static PropertyValidationContext CultureAndSegment(string? culture, string? segment)
    Parameters
    Type Name Description
    string culture

    The culture to validate.

    string segment

    The segment to validate.

    Returns
    Type Description
    PropertyValidationContext

    A property validation context for the specified culture and segment.

    View Source

    Empty()

    Creates an empty property validation context with no culture or segment.

    Declaration
    public static PropertyValidationContext Empty()
    Returns
    Type Description
    PropertyValidationContext

    An empty property validation context.

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