Validate/NotEmpty.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Validate
- Version
- $Id$
\Zend_Validate_NotEmpty
Package: Zend_Validate
Returns
- Parent(s)
- \Zend_Validate_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
$_constants = array(self::BOOLEAN => 'boolean', self::INTEGER => 'integer', self::FLOAT => 'float', self::STRING => 'string', self::ZERO => 'zero', self::EMPTY_ARRAY => 'array', self::NULL => 'null', self::PHP => 'php', self::SPACE => 'space', self::OBJECT => 'object', self::OBJECT_STRING => 'objectstring', self::OBJECT_COUNT => 'objectcount', self::ALL => 'all')
Default value
array(self::BOOLEAN => 'boolean', self::INTEGER => 'integer', self::FLOAT => 'float', self::STRING => 'string', self::ZERO => 'zero', self::EMPTY_ARRAY => 'array', self::NULL => 'null', self::PHP => 'php', self::SPACE => 'space', self::OBJECT => 'object', self::OBJECT_STRING => 'objectstring', self::OBJECT_COUNT => 'objectcount', self::ALL => 'all')
Details- Type
- n/a
array $_messageTemplates = array(self::IS_EMPTY => "Value is required and can't be empty", self::INVALID => "Invalid type given. String, integer, float, boolean or array expected")
Default value
array(self::IS_EMPTY => "Value is required and can't be empty", self::INVALID => "Invalid type given. String, integer, float, boolean or array expected")
Details- Type
- array
Methods
__construct(string | array | \Zend_Config $options = null) : void
Constructor
Parameters
Name | Type | Description |
---|---|---|
$options | string | array | \Zend_Config | OPTIONAL |
isValid(string $value) : boolean
Defined by Zend_Validate_Interface
Returns true if and only if $value is not an empty value.
ParametersName | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
boolean |
setType(integer | array $type = null) : \Zend_Validate_NotEmpty
Set the types
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$type | integer | array |
Type | Description |
---|---|
\Zend_Validate_NotEmpty |
Exception | Description |
---|---|
\Zend_Validate_Exception |