选择语言 :

 Core_Valid::not_empty

Checks if a field is not empty.

boolean Core_Valid::not_empty( )
返回值
  • boolean
File: ./core/classes/valid.class.php
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);
}