public function hasErrors($error_names = null) {
		if (empty($error_names)) {
			return !empty($this->errors['flag_error_in_fields']) || !empty($this->errors['general']['danger']);
		} else {
			if (!is_array($error_names)) {
				$error_names = [$error_names];
			}
			foreach ($error_names as $v) {
				if (!empty($this->errors['fields'][$v]['danger'])) {
					return true;
				}
			}
			return false;
		}
	}
public function hasErrors($error_names = null) {
		if (empty($error_names)) {
			return !empty($this->errors['flag_error_in_fields']) || !empty($this->errors['general']['danger']);
		} else {
			if (!is_array($error_names)) {
				$error_names = [$error_names];
			}
			foreach ($error_names as $v) {
				if (!empty($this->errors['fields'][$v]['danger'])) {
					return true;
				}
			}
			return false;
		}
	}
public function hasErrors ( $ error_names = null ) { if ( empty ( $ error_names ) ) { return ! empty ( $ this -> errors [ 'flag_error_in_fields' ] ) || ! empty ( $ this -> errors [ 'general' ] [ 'danger' ] ) ; } else { if ( ! is_array ( $ error_names ) ) { $ error_names = [ $ error_names ] ; } foreach ( $ error_names as $ v ) { if ( ! empty ( $ this -> errors [ 'fields' ] [ $ v ] [ 'danger' ] ) ) { return true ; } } return false ; } }
Whether form has errors

@param mixed $error_names
@return boolean
Whether form has errors