O'Reilly logo

Programming Atlas by Christian Wenz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required