@SohBH Thank you posting your code again. But that email validation with my own posted code already worked. I was asking for firstname and address field together if found in blacklist in a particular ID then block. I made it to work after searching for different syntax and arrived at a solution. Though I am not an expert, somehow I did it.
AVSRThe
Thank you. Already it was set. But I had difficulty in fixing it with my moderate knowledge. Now I fixed and everything works.softmonke wrote: ↑Tue May 23, 2023 4:53 amYou can try adding the following to your "index.php" file and it should show you the errors when you access the page/submit the form:Code: Select all
error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE);
catalog/model/account/customer.php
catalog/controller/account/register.php
Does not contain address
Code: Select all
public function getBlacklistCustomer(): array {
$query = $this->db->query("SELECT * FROM `blacklist`");
return $query->row;
}
catalog/controller/account/register.php
Does not contain address
Code: Select all
$blacklisted = $this->model_account_customer->getBlacklistCustomer();
if (in_array(strtolower($this->request->post['firstname']), $blacklisted['firstname']) || (utf8_strlen(trim($this->request->post['firstname'])) < 1) || (utf8_strlen(trim($this->request->post['firstname'])) > 32)) {
$this->error['firstname'] = $this->language->get('error_firstname');
}
if (in_array(strtolower($this->request->post['email']), $blacklisted['email']) || (utf8_strlen($this->request->post['email']) > 96) || !filter_var($this->request->post['email'], FILTER_VALIDATE_EMAIL)) {
$this->error['email'] = $this->language->get('error_email');
}
if (in_array((int)$this->request->post['telephone'], $blacklisted['telephone']) || (utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) {
$this->error['telephone'] = $this->language->get('error_telephone');
}
Business Web Development | Content Creation | Analytics and Reporting | SEO
If it resolve your issue kindly ADD word [SOLVED] in the post title
Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature
Who is online
Users browsing this forum: No registered users and 417 guests