Company field not allowing a . (dot)

Broem


freeSbee

Hi Broem

Go to the file save_form.php about lines 93-98:
if (strpos($field, 'company') !== false) {
if (!preg_match('#^[\p{Latin}'.$us.'0-9+&\s\-]{0,50}$#u', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_NAME'];
}
}


... and replace the code above by
if (strpos($field, 'company') !== false) {
if (!preg_match('#^[\p{Latin}'.$us.'0-9.+&\s\-]{0,50}$#u', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_NAME'];
}
}


Regards Christoph

Broem

Here in The Netherlands some company's have a . (dot) in the name. Like B.V. (the kind of firm). Now the Bakery shop checks the Company field (when enabled) for a .

I did see a topic about the address preg_match and think it is something similar for the company field, but not sure what preg_match it should be to allow a . (dot) in the field. Found it should be somewhere in the save_form.php file.