Check if the given field is valid or not.

@return boolean
437326
public function isValid()
    {
        if ($this->required && $this->field->getValue() == "") {
            return false;
        }

        // values not the same
        if ($this->field->getValue() != $this->getField2()->getValue()) {
            return false;
        }

        // if here, it's ok
        return true;
    }
537428
public function validate()
    {
        foreach ($this->fieldSet as $name => $field) {
            $field->validate();

            if (!$field->isValid()) {
                $this->valid = false;
            }
        }

        $this->validated = true;
    }
890671
public function is_valid() {
        $ret = false;

        if(is_null($this->name) === false && is_null($this->nullable) === false) {
            $ret = true;
        }

        return $ret;
    }
1051191
public function isValid()
    {
        // get the submitted value
        $value = $this->field->getForm()->getFieldValue($this->field->getName());

        // 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 multiple values are returned and if this is allowed.
        if (is_array($value) && !$this->field->isMultiple()) {
            return false;
        }

        // check if the submitted value(s) are in the options value's
        $options = $this->field->getOptions();

        if (!is_array($value)) {
            $value = (array)$value;
        }

        // check if the selected options exist
        if (!$this->checkIfOptionsExists($value, $options)) {
            return false;
        }

        return true;
    }
419629
private function isValidateArray($field) {
		
		if(true === isset($this -> validateAsArray[$field])) {
			return $this -> validateAsArray[$field];
		}

		return false;
	}
236363
function valid()
    {
        list($this->_fieldId, $this->_field) = each($this->_fields);
        return $this->_fieldId !== null;
    }
926865
public function isValid() {
		
		$valid = TRUE;
		
		foreach ($this->controls as $control) {
			
			if (!$control->validate()) {
				$valid = FALSE;
			}
			
		}
		
		return $valid;
		
	}
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;
	}
5262
public function isCsrfValid()
    {
        // csrf protection is disabled.
        if (!$this->isCsrfProtectionEnabled()) {
            return true;
        }

        // the form is not submitted
        if (!$this->isSubmitted()) {
            return true;
        }

        // the form is valid, so the csrf is also valid.
        if ($this->isValid()) {
            return true;
        }

        // the form is invalid. Let's check if the CSRF value is the problem.
        foreach ($this->fields as $field) {
            if ($field instanceof AbstractFormField && $field->getName() == 'csrftoken' && !$field->isValid()) {
                return false;
            }
        }

        // the field is not the problem...
        return true;
    }
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;
    }
1090901
public function isValid()
    {
        $this->errors = array();

        foreach ($this->rules() as $rule) {
            $fields = array_map('trim', explode(',', $rule[0]));
            $ruleName = $rule[1];
            $params = array_slice($rule, 2);

            // check scenario
            if (!empty($rule['on'])) {
                $onScenarios = explode(',', $rule['on']);
                if (!in_array($this->getScenario(), $onScenarios)) {
                    continue;
                }
            }

            if (!empty($rule['except'])) {
                $exceptScenarios = explode(',', $rule['except']);
                if (in_array($this->getScenario(), $exceptScenarios)) {
                    continue;
                }
            }

            if (method_exists($this, $ruleName)) {
                // method
                foreach ($fields as $field) {
                    $this->{$ruleName}($field, $params);
                }
            } else {
                // validator class
                $validatorClassName = $this->getValidatorClassNameByRuleName($ruleName);

                /* @var $validator \Sokil\Mongo\Validator */
                $validator = new $validatorClassName;
                if (!$validator instanceof Validator) {
                    throw new Exception('Validator class must implement \Sokil\Mongo\Validator class');
                }

                $validator->validate($this, $fields, $params);
            }
        }

        return !$this->hasErrors();
    }
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;
	}
176826
public function isValid() {

		$params = $this -> getParameters();

		if(false === isset($params[0])) {
			return trigger_error(sprintf('Missing argument 1 for %s', __METHOD__), E_USER_ERROR);
		}

		if(false === is_string($params[0])) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($params[0])), E_USER_ERROR);
		}

		foreach($this -> getValues() as $fieldname => $value) {

			if($fieldname == $params[0]) {
				return $value == $this -> getValue();
			}
		}

		return true;
	}
155192
public function isValid() : bool
   {

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

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

   }
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;
    }
763879
public function valid() {
		if ($this->string === null) {
			$this->string = fgets($this->file);
		}
		
		return $this->string === false ? false : true;
	}
598353
public function isValid($value, array $fields = []): bool
    {
        $callback = new Callback($this->validation);
        $arguments = $this->getFunctionArguments($callback->getReflection(), $value, $fields);
        return $callback->executeArray($arguments);
    }