2005-05-15 21:41:38 +00:00
|
|
|
<?PHP
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// + $Id$
|
|
|
|
// +------------------------------------------------------------------+ //
|
2005-05-16 00:52:42 +00:00
|
|
|
// + Cake <https://developers.nextco.com/cake/> + //
|
2005-05-17 21:27:56 +00:00
|
|
|
// + Copyright: (c) 2005, Cake Authors/Developers + //
|
2005-05-16 00:52:42 +00:00
|
|
|
// + Author(s): Michal Tatarynowicz aka Pies <tatarynowicz@gmail.com> + //
|
|
|
|
// + Larry E. Masters aka PhpNut <nut@phpnut.com> + //
|
|
|
|
// + Kamil Dzielinski aka Brego <brego.dk@gmail.com> + //
|
2005-05-15 21:41:38 +00:00
|
|
|
// +------------------------------------------------------------------+ //
|
2005-05-16 00:52:42 +00:00
|
|
|
// + Licensed under The MIT License + //
|
|
|
|
// + Redistributions of files must retain the above copyright notice. + //
|
2005-05-17 21:27:56 +00:00
|
|
|
// + See: http://www.opensource.org/licenses/mit-license.php + //
|
2005-05-15 21:41:38 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Purpose: Tort Validators
|
|
|
|
* Used to validate data in Models.
|
|
|
|
*
|
|
|
|
* @filesource
|
2005-05-17 21:27:56 +00:00
|
|
|
* @author Cake Authors/Developers
|
2005-05-16 00:52:42 +00:00
|
|
|
* @copyright Copyright (c) 2005, Cake Authors/Developers
|
|
|
|
* @link https://developers.nextco.com/cake/wiki/Authors Authors/Developers
|
2005-05-15 21:41:38 +00:00
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.libs
|
|
|
|
* @since Cake v 0.2.9
|
|
|
|
* @version $Revision$
|
2005-05-16 00:52:42 +00:00
|
|
|
* @modifiedby $LastChangedBy$
|
|
|
|
* @lastmodified $Date$
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
2005-05-15 21:41:38 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2005-05-31 23:18:22 +00:00
|
|
|
* Not empty.
|
2005-05-15 21:41:38 +00:00
|
|
|
*/
|
|
|
|
define('VALID_NOT_EMPTY', '/.+/');
|
|
|
|
|
|
|
|
/**
|
2005-05-31 23:18:22 +00:00
|
|
|
* Numbers [0-9] only.
|
2005-05-15 21:41:38 +00:00
|
|
|
*/
|
|
|
|
define('VALID_NUMBER', '/^[0-9]+$/');
|
|
|
|
|
|
|
|
/**
|
2005-05-31 23:18:22 +00:00
|
|
|
* A valid email address.
|
2005-05-15 21:41:38 +00:00
|
|
|
*/
|
|
|
|
define('VALID_EMAIL', '/^([a-z0-9][a-z0-9_\-\.\+]*)@([a-z0-9][a-z0-9\.\-]{0,63}\.[a-z]{2,3})$/i');
|
|
|
|
|
|
|
|
/**
|
2005-05-31 23:18:22 +00:00
|
|
|
* A valid year (1000-2999).
|
2005-05-21 22:40:51 +00:00
|
|
|
*/
|
|
|
|
define('VALID_YEAR', '/^[12][0-9]{3}$/');
|
|
|
|
|
2005-05-15 21:41:38 +00:00
|
|
|
?>
|