apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: Structures_Form_Rule_Numeric

Source Location: /Structures_Form-0.8.0devel/Form/Rule/Numeric.php

Class Overview

Structures_Form_Rule_Base
   |
   --Structures_Form_Rule_Regex
      |
      --Structures_Form_Rule_Numeric



Variables

Methods


Child classes:

Inherited Variables

Inherited Methods

Class: Structures_Form_Rule_Regex

Structures_Form_Rule_Regex::__construct()
Constructor.
Structures_Form_Rule_Regex::setRegex()
Sets the regular expression to be used for validation.
Structures_Form_Rule_Regex::validate()
Validates the given element.

Class: Structures_Form_Rule_Base

Structures_Form_Rule_Base::__construct()
Constructor.
Structures_Form_Rule_Base::addSubstitution()
Adds a new subsitution to the substitution array.
Structures_Form_Rule_Base::generateErrorString()
Generates an error string based on the class' error string and the class' substitution array.
Structures_Form_Rule_Base::removeSubstitution()
Removes a subsitution from the substitution array.
Structures_Form_Rule_Base::setErrorMessage()
Sets the error message to be used when a value fails to validate.
Structures_Form_Rule_Base::setSubstitutions()
Sets the array of error message substitutions.

Class Details

[line 22]


[ Top ]


Class Variables

$errorMessage =  '{elementName} may only be a number.'

[line 33]

The error message to be returned if the element does not validate.

The values in {curly braces} will be substituted for values from the substitiution array.

  • Access: protected

Type:   string
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 46]

void __construct( [string $errorMessage = null], [array $substitutions = null])

Constructor.

This rule does not require any additional arguments, but may accept two optional arguments.

  • Access: public

Overridden in child classes as:

Structures_Form_Rule_NumericRange::__construct()
Constructor. Calls the parent constructor then sets up the min and max values.

Overrides Structures_Form_Rule_Regex::__construct() (Constructor.)

Parameters:

string   $errorMessage   —  Optional error message.
array   $substitutions   —  Optional substitution array.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:44:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.