OpenCart 🇺🇦

Схема

protected mixed validateForm ( )

Аргументы

Аргумент Возможный тип Описание
У метода нет аргументов

Описание

Метод пока еще не документирован.

Исходный код

if (!$this->user->hasPermission('modify', 'catalog/review')) {
	$this->error['warning'] = $this->language->get('error_permission');
}

if (!$this->request->post['product_id']) {
	$this->error['product'] = $this->language->get('error_product');
}

if ((utf8_strlen($this->request->post['author']) < 3) || (utf8_strlen($this->request->post['author']) > 64)) {
	$this->error['author'] = $this->language->get('error_author');
}

if (utf8_strlen($this->request->post['text']) < 1) {
	$this->error['text'] = $this->language->get('error_text');
}

if (!isset($this->request->post['rating'])) {
	$this->error['rating'] = $this->language->get('error_rating');
}

if (!$this->error) {
	return true;
} else {
	return false;
}