选择语言 :

 Core_Valid::not_empty

Checks if a field is not empty.

boolean Core_Valid::not_empty( )
返回值
  • boolean
File: ./core/classes/valid.class.php
21
22
23
24
25
26
27
28
29
30
31
public static function not_empty($value)
{
    if (is_object($value) && $value instanceof ArrayObject)
    {
        // Get the array from the ArrayObject
        $value = $value->getArrayCopy();
    }
 
    // Value cannot be NULL, false, '', or an empty array
    return !in_array($value, array(null, false, '', array()), true);
}