Table of Contents

Class NameComponent

Namespace
Kentico.Forms.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Represents component for name property.

public class NameComponent : TextInputComponent
Inheritance
object
NameComponent
Inherited Members
Extension Methods

Fields

IDENTIFIER

Represents the NameComponent identifier.

public const string IDENTIFIER = "Kentico.Name"

Field Value

string

Properties

MaxLength

Maximal length of name.

public int MaxLength { get; }

Property Value

int

Methods

BindContext(FormComponentContext)

Binds contextual values from a PropertiesPanelComponentContext instance. The component cannot work in any other context.

public override void BindContext(FormComponentContext context)

Parameters

context FormComponentContext

Context to bind values from.

Exceptions

ArgumentException

Thrown when context is of any other type than PropertiesPanelComponentContext.

Validate(ValidationContext)

Determines whether Value of this component has correct code name format and whether it is unique in whole form.

public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext)

Parameters

validationContext ValidationContext

The validation context.

Returns

IEnumerable<ValidationResult>

A collection that holds failed-validation information.