Table of Contents

Class RequiredValidationRuleAttribute

Namespace
Kentico.Xperience.Admin.Base.FormAnnotations
Assembly
Kentico.Xperience.Admin.Base.Shared.dll

Validation rule attribute to indicate that property value is required

public class RequiredValidationRuleAttribute : ValidationRuleAttribute
Inheritance
object
Attribute
RequiredValidationRuleAttribute
Inherited Members
Extension Methods

Remarks

Error message defined by ErrorMessage supports substitution macro {0} in the error message text. The substitution macro will be replaced by FieldName value;

Constructors

RequiredValidationRuleAttribute()

Creates new instance of RequiredValidationRuleAttribute.

public RequiredValidationRuleAttribute()

Properties

FieldName

Field name used in the error message.

public string FieldName { get; set; }

Property Value

string

Remarks

If not set, the form component field name is used instead.