AnewtValidatorPreg class

Validator to check a value against a regular expression.

Class Overview

Validator to check a value against a regular expression.

Public Methods

__construct($pattern)

Create an AnewtValidatorPreg instance.

Parameters

$pattern

A regular expression to use for validating.

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.

Private Attributes

$_pattern [private]

The regular expression used in this validator.

Inheritance

Base Classes

Inherited members