public function validateRequired($value)
    {
        // Check for file!
        if (true === is_array($value) && true === array_key_exists('tmp_name', $value)) {
            // At least it was uploaded its valid in meaning of "required" <= NOT EMPTY
            $valid = ($value['error'] < UPLOAD_ERR_PARTIAL);
        } else {
            // Plain value ...
            $valid = (!is_null($value) && (is_array($value) || is_object($value) || (strlen($value) > 0)));
        }

        return $valid;
    }
public function validateRequired($value)
    {
        // Check for file!
        if (true === is_array($value) && true === array_key_exists('tmp_name', $value)) {
            // At least it was uploaded its valid in meaning of "required" <= NOT EMPTY
            $valid = ($value['error'] < UPLOAD_ERR_PARTIAL);
        } else {
            // Plain value ...
            $valid = (!is_null($value) && (is_array($value) || is_object($value) || (strlen($value) > 0)));
        }

        return $valid;
    }
public function validateRequired ( $ value ) { // Check for file! if ( true === is_array ( $ value ) && true === array_key_exists ( 'tmp_name' , $ value ) ) { // At least it was uploaded its valid in meaning of "required" <= NOT EMPTY $ valid = ( $ value [ 'error' ] < UPLOAD_ERR_PARTIAL ) ; } else { // Plain value ... $ valid = ( ! is_null ( $ value ) && ( is_array ( $ value ) || is_object ( $ value ) || ( strlen ( $ value ) > 0 ) ) ) ; } return $ valid ; }
Validates if given value fulfill the requirement "required".

@param mixed $value The value to validation

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE if fulfilled requirements, otherwise FALSE
Validates if given value fulfill the requirement required .