Check if the given field is valid or not.

@return boolean
498018
public function isValid()
    {
        $form = $this->field->getForm();

        $fields = $form->getFields();
        foreach ($fields as $field) {
            if ($field instanceof RadioButton) {
                if ($field->getName() == $this->field->getName()) {
                    if ($field->isChecked()) {
                        return true;
                    }
                }
            }
        }

        return false;
    }
598353
public function isValid($value, array $fields = []): bool
    {
        $callback = new Callback($this->validation);
        $arguments = $this->getFunctionArguments($callback->getReflection(), $value, $fields);
        return $callback->executeArray($arguments);
    }
660384
public function isFieldValid(string $field_name) : bool
    {
        if (false === $this->validated) {
            $this->validate();
        }
        return (false === $this->getErrorByFieldName($field_name));
    }
1055734
public function isValid()
    {
        $value = $this->field->getValue();

        if (is_array($value) || is_object($value)) {
            throw new \Exception("This validator only works on scalar types!");
        }

        // required but not given
        if ($this->required && $value == null) {
            return false;
        } // if the field is not required and the value is empty, then it's also valid
        elseif (!$this->required && $value == "") {
            return true;
        }

        // check if the field contains a valid number value.
        if (!preg_match('/^-?\d+$/', $value)) {
            return false;
        }

        // check if the value is not to low.
        if ($this->min !== null) {
            if ($value < $this->min) {
                return false;
            }
        }

        // check if the value is not to high.
        if ($this->max !== null) {
            if ($value > $this->max) {
                return false;
            }
        }

        return true;
    }
482650
public function isValid() {
		
		$params = $this -> getParameters();
		$file 	= $this -> getFile();
		$info 	= (object) pathinfo($file['name']);
		$params = array_map(function($value) {

			if(false === is_string($value)) {
				return trigger_error(sprintf('Extension passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($value)), E_USER_ERROR);
			}

			return ltrim(strtolower($value), '.');
		}, $params);

		if(true === isset($info -> extension) && false === in_array($info -> extension, $params)) {
			return true;
		}

		return false;
	}
83864
public function isValid() {

		if(!isset($this->valid)) {
            $this->valid = $this->applyValidators(
                $this->applyModifiers($this->getValue())
            );
		}

		return $this->valid;

	}
1142551
public function isValid()
    {
        if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {
            return false;
        }

        if (empty($this->userAgent)) {
            return false;
        }

        if (empty($this->series)) {
            return false;
        }

        if (empty($this->token)) {
            return false;
        }

        return true;
    }
544932
public function valid()
    {

        if ($this->container['orderId'] === null) {
            return false;
        }
        if ($this->container['typeId'] === null) {
            return false;
        }
        if ($this->container['regionId'] === null) {
            return false;
        }
        if ($this->container['locationId'] === null) {
            return false;
        }
        if ($this->container['range'] === null) {
            return false;
        }
        $allowedValues = $this->getRangeAllowableValues();
        if (!in_array($this->container['range'], $allowedValues)) {
            return false;
        }
        if ($this->container['isBuyOrder'] === null) {
            return false;
        }
        if ($this->container['price'] === null) {
            return false;
        }
        if ($this->container['volumeTotal'] === null) {
            return false;
        }
        if ($this->container['volumeRemain'] === null) {
            return false;
        }
        if ($this->container['issued'] === null) {
            return false;
        }
        if ($this->container['state'] === null) {
            return false;
        }
        $allowedValues = $this->getStateAllowableValues();
        if (!in_array($this->container['state'], $allowedValues)) {
            return false;
        }
        if ($this->container['minVolume'] === null) {
            return false;
        }
        if ($this->container['walletDivision'] === null) {
            return false;
        }
        if ($this->container['walletDivision'] > 7) {
            return false;
        }
        if ($this->container['walletDivision'] < 1) {
            return false;
        }
        if ($this->container['duration'] === null) {
            return false;
        }
        if ($this->container['escrow'] === null) {
            return false;
        }
        return true;
    }
659039
public function isValid()
    {
        $rules    = [];
        $isValid  = true;
        $messages = [];

        foreach ($this->rules() as $fieldName => $spec) {
            $value = $this->post($fieldName);

            foreach ($spec as $specRules => $message) {
                if (!isset($rules[ $fieldName ])) {
                    $rules[ $fieldName ] = Rule::$specRules();
                } else {
                    $rules[ $fieldName ] = $rules[ $fieldName ]->$specRules();
                }

                if (!$rules[ $fieldName ]->validate($value)) {
                    $isValid                = false;
                    $messages[ $fieldName ] = $message;
                    break;
                }

                if (!in_array($fieldName, $this->validValues)) {
                    $this->validValues[ ] = $fieldName;
                }
            }
        }

        if (!$isValid || $this->session->getErrorsBag()->has()) {
            foreach ($messages as $name => $errors) {
                $this->session->getErrorsBag()->add($name, $errors);
            }
            throw new ValidationError($messages);
        }
    }
155192
public function isValid() : bool
   {

      if ( $this->_support->hasAttribute( $this->_requiredAttributeName ) )
      {
         return true;
      }

      return $this->_support->hasAttribute( $this->_altAttributeName );

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

        if ($value == '' && $this->required == false) {
            return true;
        }

        if (filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
            return true;
        }

        return false;
    }
1239734
public function isValid()
    {
        $response = call_user_func_array($this->userFunction, array(
            &$this->field
        ));

        if ($response === true) {
            return true;
        }

        if (is_string($response)) {
            $this->setErrorMessage($response);
        }

        return false;
    }
222468
public function isValid() : bool
    {
        if (false === $this->validated) {
            $this->validate();
        }
        return (count($this->validation_errors) === 0);
    }
527138
public function validated($field = null, $default = false)
	{
		if ($field === null)
		{
			return $this->validated;
		}

		return array_key_exists($field, $this->validated) ? $this->validated[$field] : $default;
	}
621149
protected function validateValueRating()
    {
        $field = 'rating';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);
        $label = $this->translation->text('Rating');

        if (!isset($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        if (!is_numeric($value)) {
            $this->setErrorNumeric($field, $label);
            return false;
        }

        if ($value > 5) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        return true;
    }
932048
public function validate()
    {
        $errors = [];

        foreach ($this->fields as $field) {
            $result = $field->validate();

            if ($result->isFailure()) {
                $errors[] = $result;
            }
        }

        if ($errors) {
            $this->setErrors($errors);

            return false;
        }

        return true;
    }
850067
public function isValid() {
		
		$params = $this -> getParameters();
		$value 	= $this -> getValue();

		if(true === isset($params[0]) && true === is_bool($params[0])) {
			$this -> strict = $params[0];
		}

		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;
	}