ValidationHelper Class

Definition

Implements validation for user input.

public sealed class ValidationHelper
type ValidationHelper = class
Public NotInheritable Class ValidationHelper
Inheritance
ValidationHelper

Properties

FormField

Gets the name of the current form. This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

InvalidCssClass

Gets the name of the class that is used to specify the appearance of error-message display when errors have occurred. This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

ValidCssClass

Gets the name of the class that is used to specify the appearance of error-message display when errors have occurred. This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Methods

Add(IEnumerable<String>, IValidator[])

Registers a list of user input elements for validation.

Add(String, IValidator[])

Registers a user input element for validation.

AddFormError(String)

Adds an error message.

ClassFor(String)

Renders an attribute that references the CSS style definition to use when validation messages for the user input element are rendered.

For(String)

Renders attributes that enable client-side validation for an individual user input element.

GetErrors(String[])

Returns a list of current validation errors, and optionally lets you specify a list of fields to check.

IsValid(String[])

Determines whether the contents of the user input fields pass validation checks, and optionally lets you specify a list of fields to check.

RequireField(String)

Registers the specified field as one that requires user entry.

RequireField(String, String)

Registers the specified field as one that requires user entry and registers the specified string as the error message to display if no value is supplied.

RequireFields(String[])

Registers the specified fields as ones that require user entry.

Validate(String[])

Performs validation on elements registered for validation, and optionally lets you specify a list of fields to check.

Applies to