(PHP 5 &gt;= 5.0.0)<br/>
Checks if current position is valid
@link http://php.net/manual/en/iterator.valid.php
@return boolean The return value will be casted to boolean and then evaluated.
Returns true on success or false on failure.
331165
public function valid()
    {
        if (!is_array($this->val)) {
            return null;
        }
        if ($this->assocArray) {
            $keys = array_keys($this->val);
            return isset($keys[$this->position]);
        }

        return isset($this->val[$this->position]);
    }
975841
public function valid()
    {
        if($this->folderList == null){
            $this->folderList = $this->listFolder();
        }
        return is_array($this->folderList) && isset($this->folderList[$this->key]);
    }
1215974
public function valid()
    {
        if (!isset($this->keys[$this->position])) {
            return false;
        }

        $currentKey = $this->keys[$this->position];

        return isset($this->items[$currentKey]);
    }
52911
public function valid()
    {
        if (is_null($this->current)) {
            return true;
        }
        if ($this->current instanceof RecursiveLeafInterface) {
            return $this->current->valid();
        }

        return false;
    }
1138809
public function valid()
    {
        return isset($this->base['value'][$this->position]) && is_array($this->base['value'][$this->position]);
    }
194443
public function valid()
    {
        if ($this->_buffer->offsetExists($this->_index)) {
            $current = $this->_buffer->offsetGet($this->_index);
            $this->_current = $current['value'];
            $this->_key = $current['key'];

            return true;
        }

        $valid = parent::valid();

        if ($valid) {
            $this->_current = parent::current();
            $this->_key = parent::key();
            $this->_buffer->push([
                'key' => $this->_key,
                'value' => $this->_current
            ]);
        }

        $this->_finished = !$valid;

        return $valid;
    }
596274
public function valid()
    {
        if (null === $this->currentDate) {
            return false;
        }
        if (!is_null($this->count)) {
            return $this->counter < $this->count;
        }

        return is_null($this->until) || $this->currentDate <= $this->until;
    }
287925
public function check()
    {
        $currentValue = (int) ini_get($this->setting);
        
        $return = false;
        foreach($this->requiredValues as $key => $requiredValue){
            $this->requiredValues[$key]['isValid'] = version_compare($currentValue, $requiredValue['requiredValue'], $requiredValue['operator']);
            
            if($this->requiredValues[$key]['isValid']){
                $return = true;
            }
        }
        
        return $return;
    }
1283493
public function valid()
    {
        if (is_null($this->current)) {
            return ! empty($this->branch);
        }
        if ($this->current instanceof RecursiveLeafInterface) {
            return $this->current->valid();
        }

        return false;
    }
1085664
public function valid()
    {
        if (key($this->_data) === null) {
            return false;
        }

        $current = current($this->_data);
        while (!$current->value()) {
            $current = $this->next();
            if (key($this->_data) === null) {
                return false;
            }
        }
        return true;
    }
1154548
public function validate()
    {
		$returnValue = true;
		
		if(!$this->forcedValid){
			foreach($this->validators as $validator){
				if(!$validator->evaluate($this->getRawValue())){
					$this->error[] = $validator->getMessage();
					$returnValue = false;
					common_Logger::d($this->getName().' is invalid for '.$validator->getName(), array('TAO'));
                    if ($this->isBreakOnFirstError()){
                        break;
                    }
				}
			}
		}

        return $returnValue;
    }
1201481
public function valid()
    {
        $encryptStr = "";
        if ($_SERVER['REQUEST_METHOD'] == "POST") {
            $postStr = file_get_contents("php://input");
            $disableEntities = libxml_disable_entity_loader(true);
            $array = (array)simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
            libxml_disable_entity_loader($disableEntities);
            $this->encrypt_type = isset($_GET["encrypt_type"]) ? $_GET["encrypt_type"] : '';
            if ($this->encrypt_type == 'aes') {
                $encryptStr = $array['Encrypt'];
                !class_exists('Prpcrypt', false) && require __DIR__ . '/Prpcrypt.php';
                $pc = new Prpcrypt($this->encodingAesKey);
                $array = $pc->decrypt($encryptStr, $this->appid);
                if (!isset($array[0]) || intval($array[0]) > 0) {
                    $this->errCode = $array[0];
                    $this->errMsg = $array[1];
                    Tools::log("Interface Authentication Failed. {$this->errMsg}[{$this->errCode}]", "ERR - {$this->appid}");
                    return false;
                }
                $this->postxml = $array[1];
                empty($this->appid) && $this->appid = $array[2];
            } else {
                $this->postxml = $postStr;
            }
        } elseif (isset($_GET["echostr"])) {
            if ($this->checkSignature()) {
                @ob_clean();
                exit($_GET["echostr"]);
            }
            return false;
        }
        if (!$this->checkSignature($encryptStr)) {
            $this->errMsg = 'Interface authentication failed, please use the correct method to call.';
            return false;
        }
        return true;
    }
638217
protected function _validate()
	{

		// Check if validation is necessary and parsed
		if (static::$validates === false) return true;
		if (is_null(static::$_validation)) {
			require_once("Validation/Validation.php");
			static::$_validation = Validation\Validation::onModel(get_called_class());
		}

		
		// Go validate!
		$result = static::$_validation->validate($this);

		// Success?
		if ($result->success == false) {

			// Store errors
			$this->_errors = $result->errors;

			return false;
		} else {

			// Clear errors
			$this->_errors = null;

		}

		// True
		return true;

	}
1085324
public function isValid() {
		
		$value = $this -> getValue();

		if(true === $this -> getValidateAsArray() && true === is_array($value)) {
			
			foreach($value as $val) {

				if(false === $this -> check($val)) {
					return false;
				}
			}
		}
		else {
			return $this -> check($value);
		}

		return true;
	}
1321049
public function valid()
    {
        $keys = array_keys($this->tags);
        return isset($keys[$this->position]) && isset($this->tags[$keys[$this->position]]);
    }
417359
public function valid()
    {
        if ($this->_useBuffering) {
            $valid = $this->_index < $this->_count;
            if ($valid && $this->_results[$this->_index] !== null) {
                $this->_current = $this->_results[$this->_index];

                return true;
            }
            if (!$valid) {
                return $valid;
            }
        }

        $this->_current = $this->_fetchResult();
        $valid = $this->_current !== false;

        if ($valid && $this->_useBuffering) {
            $this->_results[$this->_index] = $this->_current;
        }
        if (!$valid && $this->_statement !== null) {
            $this->_statement->closeCursor();
        }

        return $valid;
    }
693580
public function valid()
    {
        try {
            $this->g->current();
            return $this->e === null && $this->g->valid() && $this->g->key() !== CoInterface::RETURN_WITH;
        } catch (\Throwable $e) {} catch (\Exception $e) {}
        $this->e = $e;
        return false;
    }