File indexing completed on 2024-12-22 05:37:12

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Validate
0017  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0018  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0019  * @version    $Id$
0020  */
0021 
0022 /**
0023  * @category   Zend
0024  * @package    Zend_Validate
0025  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0026  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0027  */
0028 interface Zend_Validate_Interface
0029 {
0030     /**
0031      * Returns true if and only if $value meets the validation requirements
0032      *
0033      * If $value fails validation, then this method returns false, and
0034      * getMessages() will return an array of messages that explain why the
0035      * validation failed.
0036      *
0037      * @param  mixed $value
0038      * @return boolean
0039      * @throws Zend_Validate_Exception If validation of $value is impossible
0040      */
0041     public function isValid($value);
0042 
0043     /**
0044      * Returns an array of messages that explain why the most recent isValid()
0045      * call returned false. The array keys are validation failure message identifiers,
0046      * and the array values are the corresponding human-readable message strings.
0047      *
0048      * If isValid() was never called or if the most recent isValid() call
0049      * returned true, then this method returns an empty array.
0050      *
0051      * @return array
0052      */
0053     public function getMessages();
0054 }