Table of Contents

Class IdentifierValidationRule

Namespace
Kentico.Xperience.Admin.Base.Forms
Assembly
Kentico.Xperience.Admin.Base.dll

Validates whether field value is a valid identifier.

[ValidationRuleAttribute(typeof(IdentifierValidationRuleAttribute))]
public sealed class IdentifierValidationRule : ValidationRule<IdentifierValidationRuleProperties, string>, IValidationRule
Inheritance
object
IdentifierValidationRule
Implements
Inherited Members
Extension Methods

Constructors

IdentifierValidationRule(ILocalizationService)

Creates a new instance of IdentifierValidationRule class.

public IdentifierValidationRule(ILocalizationService localizationService)

Parameters

localizationService ILocalizationService

Properties

ClientRuleName

Gets the client rule name identifier.

public override string ClientRuleName { get; }

Property Value

string

DefaultErrorMessage

Defines default error message of the validation rule.

protected override string DefaultErrorMessage { get; }

Property Value

string

Methods

Validate(string, IFormFieldValueProvider)

Validates whether value is a valid identifier.

public override Task<ValidationResult> Validate(string value, IFormFieldValueProvider formFieldValueProvider)

Parameters

value string

Value to be validated.

formFieldValueProvider IFormFieldValueProvider

Provider of values of other form fields for contextual validation.

Returns

Task<ValidationResult>

Returns the validation result.