Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZRegExpValidator Class Reference

Input validation using regexps. More...

Inheritance diagram for eZRegExpValidator:

## Public Member Functions
| __construct ( $rule=null)
| setRegExpRule ( $rule)
| validate ( $text)
| fixup ( $text)

## Public Attributes
| $RegExpRule
Public Attributes inherited from eZInputValidator
const | STATE_ACCEPTED = 1
const | STATE_INTERMEDIATE = 2
const | STATE_INVALID = 3

## Detailed Description

Input validation using regexps.

Definition at line 17 of file ezregexpvalidator.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZRegExpValidator::__construct | ( |  | $rule = `null` | ) |

Constructor

Parameters

  string | $rule |

Definition at line 24 of file ezregexpvalidator.php.

## Member Function Documentation

## ◆ fixup()

eZRegExpValidator::fixup | ( |  | $text | ) |

Tries to fix the text $text which was previously marked as eZInputValidator::STATE_INTERMEDIATE so that it can be seen as eZInputValidator::STATE_ACCEPTED.

Reimplemented from eZInputValidator.

Reimplemented in eZIntegerValidator, and eZFloatValidator.

Definition at line 47 of file ezregexpvalidator.php.

## ◆ setRegExpRule()

eZRegExpValidator::setRegExpRule | ( |  | $rule | ) |

Definition at line 29 of file ezregexpvalidator.php.

## ◆ validate()

eZRegExpValidator::validate | ( |  | $text | ) |

Tries to validate to the text $text and returns one of the validator states eZInputValidator::STATE_ACCEPTED, eZInputValidator::STATE_INTERMEDIATE or eZInputValidator::STATE_INVALID. This returns eZInputValidator::STATE_ACCEPTED as default and must be reimplemented in real valiators.

Reimplemented from eZInputValidator.

Reimplemented in eZIntegerValidator, and eZFloatValidator.

Definition at line 34 of file ezregexpvalidator.php.

References eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INTERMEDIATE, and eZInputValidator\STATE_INVALID.

Referenced by eZFloatValidator\validate(), and eZIntegerValidator\validate().

## Member Data Documentation

## ◆ $RegExpRule

eZRegExpValidator::$RegExpRule

Definition at line 63 of file ezregexpvalidator.php.

The documentation for this class was generated from the following file:

- ezregexpvalidator.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.