Search Results for

    Show / Hide Table of Contents
    View Source

    Class ValidationHelper

    Provides helper methods for validation of property editor values based on data type configuration.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.PropertyEditors.Validation
    Assembly: Umbraco.Core.dll
    Syntax
    public static class ValidationHelper

    Methods

    View Source

    HasValidStartNode(IEnumerable<Guid>, Guid, INavigationQueryService)

    Checks if all provided entities has the start node as an ancestor.

    Declaration
    public static bool HasValidStartNode(IEnumerable<Guid> entityKeys, Guid startNode, INavigationQueryService navigationQueryService)
    Parameters
    Type Name Description
    IEnumerable<Guid> entityKeys

    Keys to check.

    Guid startNode

    The configured start node.

    INavigationQueryService navigationQueryService

    The navigation query service to use for the checks.

    Returns
    Type Description
    System.Boolean

    True if the startnode key is in the ancestry tree.

    View Source

    IsValueValidForStep(Decimal, Decimal, Decimal)

    Checks if a provided value is valid based on the configured step and minimum values.

    Declaration
    public static bool IsValueValidForStep(decimal value, decimal min, decimal step)
    Parameters
    Type Name Description
    System.Decimal value

    The provided value.

    System.Decimal min

    The configured minimum value.

    System.Decimal step

    The configured step value.

    Returns
    Type Description
    System.Boolean

    True if the value is valid otherwise false.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • HasValidStartNode(IEnumerable<Guid>, Guid, INavigationQueryService)
      • IsValueValidForStep(Decimal, Decimal, Decimal)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX