OpenCart 🇺🇦

Схема

protected mixed validate ( )

Аргументы

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

Описание

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

Исходный код

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

if (!preg_match('/^[0-9]{4}$/', $this->request->post['auspost_postcode'])){
	$this->error['postcode'] = $this->language->get('error_postcode');
}

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