Table of Contents

Interface IFormComponentValidator

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

Implement this interface to perform form builder model validation.

public interface IFormComponentValidator
Extension Methods

Methods

ValidateCompareToFieldRules(string, FormComponent, List<FormComponent>)

Validates rules which are of compare-to-another-field type.

IEnumerable<string> ValidateCompareToFieldRules(string formName, FormComponent component, List<FormComponent> allComponents)

Parameters

formName string

Name of the form containing the components being validated.

component FormComponent

Component to validate.

allComponents List<FormComponent>

All form components.

Returns

IEnumerable<string>

Enumeration of validation errors, empty if validation succeeded.

ValidateComponentValue(FormComponent)

Validates bound component value and component's validation rules.

IEnumerable<string> ValidateComponentValue(FormComponent component)

Parameters

component FormComponent

Component whose value is validated.

Returns

IEnumerable<string>

Enumeration of validation errors, empty if validation succeeded.