Test whether errors of a certain type have been raised system wide
@param int optional bitmask
@return bool
325338
static function is_error( $emask = null ) {
		if( $emask === null ){
			return (bool) self::get_global_level();
		}	
		else {
			return (bool) ( self::get_global_level() & $emask );
		}
	}
979107
public boolean hasErrors(){
		if(this.messageHandlers.containsKey(E_MessageType.ERROR)){
			return (this.messageHandlers.get(E_MessageType.ERROR).getCount()==0)?false:true;
		}
		return false;
	}
695958
public function isValid() {
		
		$params = $this -> getParameters();
		$file 	= $this -> getFile();

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

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

		$size = @filesize($file['tmp_name']);

		if(true === is_int($size)) {

			if($size >= $params[0]) {
				return true;
			}
		}

		return false;
	}
1182338
public function showErrors()
    {
        $reporting = $this->getEnvironmentConfig('ErrorReporting', false);
        if ($reporting && strtolower($reporting) == 'on') {
            return true;
        }

        return false;
    }
729815
public function isValid() {
		
		$params = $this -> getParameters();
		$file 	= $this -> getFile();

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

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

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

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

		$dimensions = @getimagesize($file['tmp_name']);

		if(true === is_array($dimensions)) {

			if($dimensions[0] === $params[0] && $dimensions[1] === $params[1]) {
				return true;
			}
		}

		return false;
	}
539044
public function Check($value)
    {
        $this->error = '';
        if ($this->currentFile && $value == $this->currentFile)
        {
            return true;
        }
        if (!Folder::Exists($this->folder))
        {
            return true;
        }
        $files = Folder::GetFiles($this->folder);
        if ($this->fileExtension)
        {
            $value = Path::AddExtension($value, $this->fileExtension);
        }
        if (in_array($value, $files))
        {
            $this->error = self::ExistsInFolder;
        }
        return $this->error == '';
    }
164078
public function hasErrors($key = NULL)
    {
        if ($key) {
            return isset($this[$key]);
        } else {
            if (count($this)) {
                return true;
            } else {
                return false;
            }
        }
    }
105404
public boolean hasErrors() {

        if ((m_validatedNewEntry != null) && m_validatedNewEntry.hasErrors()) {
            return true;
        }
        for (CmsAliasTableRow row : m_changedRows) {
            if (row.hasErrors()) {
                return true;
            }
        }
        return false;
    }
954204
public function isValid()
    {
        return ((!empty($this->hex) && ctype_xdigit($this->hex)) && (!empty($this->dec) && ctype_digit($this->dec)));
    }
1167903
public function validate(&$error = null)
    {
        if (!$this->isCountryCodeValid()) {
            $error = 'IBAN country code not valid or not supported';
        } elseif (!$this->isLengthValid()) {
            $error = 'IBAN length is invalid';
        } elseif (!$this->isFormatValid()) {
            $error = 'IBAN format is invalid';
        } elseif (!$this->isChecksumValid()) {
            $error = 'IBAN checksum is invalid';
        } else {
            $error = '';
            return true;
        }

        return false;
    }
631801
protected function checkValue(&$errors = [])
    {
        if ($this->getRequired() && !array_key_exists($this->getName(), $_FILES)) {
            $errors[] = $this->getLabel() . ' is required.';
            $this->error = $this->getLabel() . ' is required.';
            return false;
        }

        return true;
    }
919734
public function hasErrorMessages() {
      $messages = $this->getMessages();
      foreach ($messages as $message) {
        if ($message->mt == 'error') {
          return true;
        }
      }
      return false;
    }
295710
public function isValid() {
		
		$params = $this -> getParameters();
		$file 	= $this -> getFile();

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

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

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

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

		$size = @filesize($file['tmp_name']);

		if(true === is_int($size)) {

			if($size >= $params[0] && $size <= $params[1]) {
				return true;
			}
		}

		return false;
	}
932834
public function check(): bool
  {
    if ( $this->current !== null ){
      // if $on_error is set to E_CONTINUE returns true
      if ( $this->on_error === self::E_CONTINUE ){
        return true;
      }
      // If any connection has an error with mode E_STOP_ALL
      if ( self::$has_error_all && ($this->on_error !== self::E_STOP_ALL) ){
        return false;
      }
      // If this connection has an error with mode E_STOP
      if ( $this->has_error && ($this->on_error !== self::E_STOP) ){
        return false;
      }
      return true;
    }
    return false;
  }
1123639
protected function checkPermissionMask($selfError, $exists, $pathname, $mask)
    {
        return !(!$selfError && !$exists && !chmod($pathname, (int)$mask));
    }
905815
private function validateNip(): bool
    {
        if (!\preg_match('/^[0-9]{10}$/', $this->value)) {
            $this->setError(self::VALIDATOR_ERROR_NIP_INCORRECT_FORMAT);
            return false;
        }

        $checksum = 0;
        $weightArray = [6, 5, 7, 2, 3, 4, 5, 6, 7];

        for ($i = 0; $i < 9; $i++) {
            $checksum += $weightArray[$i] * $this->value[$i];
        }
        $isValid = $checksum % 11 == $this->value[9] ? true : false;
        if (!$isValid) {
            $this->setError(self::VALIDATOR_ERROR_NIP_INVALID_NUMBER);
        }

        return $isValid;
    }
694658
private function validateGreaterThan(): bool
    {
        if ($this->options['min'] !== null) {
            if ($this->options['inclusive'] === false && $this->value <= $this->options['min']) {
                $this->setError(self::VALIDATOR_ERROR_NUMBER_MUST_BE_HIGHER_THAN_MIN);
                return false;
            }

            if ($this->value < $this->options['min']) {
                $this->setError(self::VALIDATOR_ERROR_NUMBER_MUST_BE_HIGHER_OR_EQUAL_TO_MIN);
                return false;
            }
        }
        return true;
    }