Opencart 2,3,0,2, Journal 3
I checked journal/skin/checkout telephone as required. (If I do hidden, it works but required is not)
catalog/controller/account/register.php
I have solved checking telephone number 10 digit and only numeric with the code below:
if (
(utf8_strlen($this->request->post['telephone']) < 9) ||
(utf8_strlen($this->request->post['telephone']) > 11) ||
preg_match('/[^\d]/is', $this->request->post['telephone'])
) {
$this->error['telephone'] = $this->language->get('error_telephone');
but catalog/controller/checkout/register.php
is not solved in this way.
Some forums say that telephone can be changed in settings which there is not any option in 2,3,0,2.
last name, first name validation works perfectly with the code below but language does not work in catalog/controller/checkout/register.php
if (
(utf8_strlen(trim($this->request->post['telephone'])) < 1) ||
(utf8_strlen(trim($this->request->post['telephone'])) > 32)
) {
$json['error']['telephone'] = $this->language->get('error_telephone');
}
What did I miss?