Documentation

Validator.class.php

Cloudrexx

Tags
link
http://www.cloudrexx.com
copyright

Cloudrexx AG 2007-2015

According to our dual licensing model, this program can be used either under the terms of the GNU Affero General Public License, version 3, or under a proprietary license.

The texts of the GNU Affero General Public License with an additional permission and of our proprietary license can be found at and in the LICENSE file you have received along with this program.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

"Cloudrexx" is a registered trademark of Cloudrexx AG. The licensing of the program under the AGPLv3 does not imply a trademark license. Therefore any rights, title and interest in our trademarks remain entirely with us.

Table of Contents

Classes

FWValidator
Framework Validator
CxValidate
An abstract base for ZendValidator-Style instantiable Validators
CxValidateString
Validates Strings to a set of constraints
CxValidateRegexp
CxValidateRegexp
CxValidateInteger
CxValidateInteger
CxValidateComponentName
CxValidateComponentName

Constants

VALIDATOR_REGEX_EMAIL  = '[a-zäàáâöôüûñéè0-9!\#\$\%\&\'\*\+\/\=\?\^_\`\{\|\}\~-]+(?:\.[a-zäàáâöôüûñéè0-9!\#\$\%\&\'\*\+\/\=\?\^_\`\{\|\}\~-]+)*@(?:[a-zäàáâöôüûñéè0-9](?:[a-zäàáâöôüûñéè0-9-]*[a-zäàáâöôüûñéè0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'
Regular Expression for e-mail addresses TKaelin @ 2.0.2: wrote new regex based on http://en.wikipedia.org/wiki/E-mail_address Dave V, @ 2.1.2: re-wrote regex according to http://www.regular-expressions.info/email.html Reto Kohli @ 2.1.4: Fixed e-mail regex for PHP by adding more backslashes for special characters
VALIDATOR_REGEX_EMAIL_JS  = '^' . \VALIDATOR_REGEX_EMAIL . '$'
Regular Expression in javascript for e-mail addresses
VALIDATOR_REGEX_URI  = \VALIDATOR_REGEX_URI_PROTO . '?((([\wäàáâöôüûñéè\d-]{1,}\.)+[a-z]{2,})|((?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)(?:(\.?\d)\.)) {4}))(?:[\w\d]+)?(\/[\w\d\-\.\?\,\'\/\\\\+\&\%\$\#\=\~:]*)?'
Regular Expression for URIs
VALIDATOR_REGEX_URI_JS  = '^' . \VALIDATOR_REGEX_URI . '$'
Regular Expression in javascript for URIs
VALIDATOR_REGEX_URI_PROTO  = '(?:(?:ht|f)tps?\:\/\/)'
Regular Expression for URI protocols

Constants

VALIDATOR_REGEX_EMAIL

Regular Expression for e-mail addresses TKaelin @ 2.0.2: wrote new regex based on http://en.wikipedia.org/wiki/E-mail_address Dave V, @ 2.1.2: re-wrote regex according to http://www.regular-expressions.info/email.html Reto Kohli @ 2.1.4: Fixed e-mail regex for PHP by adding more backslashes for special characters

public mixed VALIDATOR_REGEX_EMAIL = '[a-zäàáâöôüûñéè0-9!\#\$\%\&\'\*\+\/\=\?\^_\`\{\|\}\~-]+(?:\.[a-zäàáâöôüûñéè0-9!\#\$\%\&\'\*\+\/\=\?\^_\`\{\|\}\~-]+)*@(?:[a-zäàáâöôüûñéè0-9](?:[a-zäàáâöôüûñéè0-9-]*[a-zäàáâöôüûñéè0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'
Tags
since
2.0.0

VALIDATOR_REGEX_EMAIL_JS

Regular Expression in javascript for e-mail addresses

public mixed VALIDATOR_REGEX_EMAIL_JS = '^' . \VALIDATOR_REGEX_EMAIL . '$'
Tags
author

Michael Räss info@cloudrexx.com

since
2.2.6

VALIDATOR_REGEX_URI

Regular Expression for URIs

public mixed VALIDATOR_REGEX_URI = \VALIDATOR_REGEX_URI_PROTO . '?((([\wäàáâöôüûñéè\d-]{1,}\.)+[a-z]{2,})|((?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)(?:(\.?\d)\.)) {4}))(?:[\w\d]+)?(\/[\w\d\-\.\?\,\'\/\\\\+\&\%\$\#\=\~:]*)?'
Tags
author

Reto Kohli reto.kohli@comvation.com

since
2.2.0

VALIDATOR_REGEX_URI_JS

Regular Expression in javascript for URIs

public mixed VALIDATOR_REGEX_URI_JS = '^' . \VALIDATOR_REGEX_URI . '$'
Tags
author

Michael Räss info@cloudrexx.com

since
2.2.6

VALIDATOR_REGEX_URI_PROTO

Regular Expression for URI protocols

public mixed VALIDATOR_REGEX_URI_PROTO = '(?:(?:ht|f)tps?\:\/\/)'

Known protocols include HTTP, HTTPS, FTP, and FTPS.

Tags
author

Reto Kohli reto.kohli@comvation.com

since
2.2.0

        
On this page

Search results