Class fever.data.validators.Validator

Description

Base class for all validators.

Take a look at fever.data.validators package to see all available validator in Fever.

Use ValidationResources for localisation.

See Also

Field Index

enabled, INVALID, property, required, source, VALID

Method Index

validate()

Field Detail

INVALID

static public INVALID:EventType
Dispatched when test is not valid.

VALID

static public VALID:EventType
Dispatched when test is valid.

enabled

public enabled:Boolean
Setting this value to false will stop the validator from performing validation

property

public property
A String specifying the name of the property of the source object that contains the value to validate.

required

public required:Boolean
If true, specifies that a missing or empty value causes a validation error.

source

public source
Returns the object containing the property to validate.

Method Detail

validate

public function validate(object):ValidationResultEvent

Performs validation and optionally notifies the listeners of the result.

Parameters

Return

A ValidationResultEvent object containing the results of the validation.