Subversion Repositories Applications.papyrus

Rev

Rev 320 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 320 Rev 443
Line 14... Line 14...
14
// | license@php.net so we can mail you a copy immediately.               |
14
// | license@php.net so we can mail you a copy immediately.               |
15
// +----------------------------------------------------------------------+
15
// +----------------------------------------------------------------------+
16
// | Authors: Bertrand Mansion <bmansion@mamasam.com>                     |
16
// | Authors: Bertrand Mansion <bmansion@mamasam.com>                     |
17
// +----------------------------------------------------------------------+
17
// +----------------------------------------------------------------------+
18
//
18
//
19
// $Id: Required.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
19
// $Id: Required.php,v 1.2 2005-09-20 17:01:22 ddelon Exp $
Line 20... Line 20...
20
 
20
 
Line 21... Line 21...
21
require_once('HTML/QuickForm/Rule.php');
21
require_once('HTML/QuickForm/Rule.php');
22
 
22
 
Line 34... Line 34...
34
     * @access    public
34
     * @access    public
35
     * @return    boolean   true if value is not empty
35
     * @return    boolean   true if value is not empty
36
     */
36
     */
37
    function validate($value, $options = null)
37
    function validate($value, $options = null)
38
    {
38
    {
39
        if ($value == '') {
39
        if ((string)$value == '') {
40
            return false;
40
            return false;
41
        }
41
        }
42
        return true;
42
        return true;
43
    } // end func validate
43
    } // end func validate