Class AlphaCharsValidator

Description

Validates if a string contains alphanumeric chars only

The default behaviour of this validator is to accept lowercase (a-z) and uppercase (A-Z) letters only. In order to accept more chars, you need to provide one or more of the following flags:

  • space: accepts whitespace chars
  • number: accepts numbers
  • punctuation: accepts punctuation chars
  • acclower: accepts lowercase accented chars
  • accupper: accepts uppercase accented chars

Located in /core/validation/AlphaCharsValidator.class.php (line 49)

PHP2Go
   |
   --AbstractValidator
      |
      --AlphaCharsValidator
Variable Summary
string $pattern
Method Summary
AlphaCharsValidator AlphaCharsValidator ([array $params = NULL])
bool execute (mixed $value)
Variables
string $pattern (line 57)

Regular expression pattern

  • access: private

Inherited Variables

Inherited from AbstractValidator

AbstractValidator::$errorMessage
AbstractValidator::$fieldLabel
Methods
Constructor AlphaCharsValidator (line 72)

Class constructor

Accepted arguments:

  • space (boolean): whether whitespace chars should be accepted
  • number (boolean): whether numeric chars should be accepted
  • punctuation (boolean): whether punctuation chars should be accepted
  • acclower (boolean): whether lowercase accented chars should be accepted
  • accupper (boolean): whether uppercase accented chars should be accepted

AlphaCharsValidator AlphaCharsValidator ([array $params = NULL])
  • array $params: Arguments
execute (line 95)

Runs the validation

bool execute (mixed $value)
  • mixed $value: Value to be validated

Redefinition of:
AbstractValidator::execute()
Must be implemented by child classes

Inherited Methods

Inherited From AbstractValidator

AbstractValidator::AbstractValidator()
AbstractValidator::execute()
AbstractValidator::getError()

Inherited From PHP2Go

PHP2Go::PHP2Go()
PHP2Go::equals()
PHP2Go::generateUniqueId()
PHP2Go::getClassName()
PHP2Go::getConfigVal()
PHP2Go::getLangVal()
PHP2Go::getObjectName()
PHP2Go::getParentName()
PHP2Go::hasDestructor()
PHP2Go::hashCode()
PHP2Go::isA()
PHP2Go::isSubclassOf()
PHP2Go::logError()
PHP2Go::raiseError()
PHP2Go::registerDestructor()
PHP2Go::registerShutdownFunc()
PHP2Go::retrieve()
PHP2Go::store()
PHP2Go::__toString()

Documentation generated on Sun, 07 Oct 2007 19:20:11 -0300 by phpDocumentor 1.3.2