Table of Contents

Class RegisterFormValidationRuleAttribute

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

Registers a form validation rule.

[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class RegisterFormValidationRuleAttribute : Attribute
Inheritance
object
Attribute
RegisterFormValidationRuleAttribute
Extension Methods

Remarks

Use attribute to register validation rule to the system. It is not mandatory to register validation rule. Form component implementation can instantiate specific rule itself and call AddValidationRule(IValidationRule) method. Registered rule will be available for class fields depending on generic type and field data type.

Constructors

RegisterFormValidationRuleAttribute(string, Type, string, string)

Initializes a new instance of the RegisterFormValidationRuleAttribute class.

public RegisterFormValidationRuleAttribute(string identifier, Type ruleType, string name, string description = null)

Parameters

identifier string

Unique identifier of the validation rule.

ruleType Type

Type implementing the validation rule.

name string

Name of the validation rule.

description string

Description of the validation rule.

Properties

Description

Description of the validation rule.

public string Description { get; }

Property Value

string

Identifier

Unique identifier of the validation rule.

public string Identifier { get; }

Property Value

string

MarkedType

Type implementing the validation rule.

public Type MarkedType { get; }

Property Value

Type

Name

Name of the validation rule.

public string Name { get; }

Property Value

string