AnewtValidatorFloat class

Validator to only allow floating point numbers.

Class Overview

Validator to only allow floating point numbers.

This validator checks whether the value is or looks like a floating point number and is between the minimum and maximum value.

Public Methods

__construct($min=0.0, $max=null)

Create a new AnewtValidatorFloat.

Parameters

$min

Minimum allowable value. Provide null for no limit. Defaults to 0.

$max

Maximum allowable value. Provide null for no limit. Defaults to null.

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

$_min [private]

Minimal value.

$_max [private]

Maximal value.

Inheritance

Base Classes

Inherited members