Access keys

ValidationRule

Kind of class: class
Inherits from: none
Implements:
Known subclasses:
Author: Martijn de Visser
Classpath: org.asapframework.util.forms.validate.ValidationRule
File last modified: Thursday, 13 July 2006, 09:33:59
Base class for validation rule classes, subclasses must implement the IValidationRule interface.

Summary

Constructor

Constructor

ValidationRule

function ValidationRule (
inTarget:Object, inCondition:Object)
Parameters:
inTarget :
Target object to validate, has to implement the IValidate interface. Except TextFields, these will be accessed through .text.
inCondition:
sometimes needed to test against (for example in a greater than validation)

Instance methods

getCondition

function getCondition (
) : Object
The (untyped) validation condition.

getTarget

function getTarget (
) : Object
The (untyped) validation target. Must either implement IValidate or be a TextField.

getValue

function getValue (
) : Object
The (untyped) value of the validation target.

toString

function toString (
) : String

validate

function validate (
) : Boolean
Validates this rule, implement in subclass.