Validation Controls

Atlas provides several client-side validation controls.

Sys.UI.Validator (General Class)

Method

Description

get_dataContext()

Returns the validator’s data context

get_errorMessage()

Returns the validator’s error message

set_errorMessage(value)

Sets the validator’s error message

get_isInvalid()

Whether the validator has been violated or not

performValidation(value)

Executes the validator

setOwner(control)

Links the validator to its owner element

validate()

Abstract method to validate the element

Sys.UI.ValidationGroup

Method

Description

get_associatedControls()

Returns the group’s associated controls

get_isInvalid()

Whether the data in the group is invalid (in terms of the validators) or not

Sys.UI.RequiredFieldValidator

This class implements validate() but does not provide additional methods.

Sys.UI.TypeValidator

Method

Description

get_type()

Returns the type the validator has to check

set_type(value)

Sets the type the validator has to check

Sys.UI.RangeValidator

Method

Description

get_lowerBound()

Returns the lower bound of the validator’s range

set_lowerBound(value)

Sets the lower bound of the validator’s range

get_upperBound()

Returns the upper bound of the validator’s range

set_upperBound(value)

Sets the upper bound of the validator’s range

Sys.UI.RegexValidator

Method

Description

get_regex()

Returns the regular expression the validator has to check

set_regex(value) ...

Get Programming Atlas now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.