AnewtValidator class

Base class for validators.

Class Overview

Base class for validators.

This class does nothing by default. Real validator implementations should subclass this class and implement at least the is_valid() method.

Public Methods

__construct()

Create a new validator instance.

This method can be overridden in subclasses, e.g. to handle some values that influence the validator's behaviour.

Make sure to call the parent constructor from your custom contructor!

is_valid($value)

Checks for validity.

The return value should be true for valid values, and false otherwise.

Parameters

$value

The value to check for validity.

Return value

True if the value is valid, false otherwise.

Inheritance

Base Classes

Inherited members