WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Company field not allowing a . (dot)
  • Print
Pages: [1]   Go Down

Author Topic: Company field not allowing a . (dot)  (Read 4886 times)

Offline Broem

  • Posts: 7
Company field not allowing a . (dot)
« on: September 21, 2016, 08:15:26 AM »
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.
Logged

freeSbee

  • Guest
Re: Company field not allowing a . (dot)
« Reply #1 on: September 21, 2016, 10:03:26 AM »
Hi Broem

Go to the file save_form.php about lines 93-98:
Code: [Select]
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
Code: [Select]
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
Logged

Offline Broem

  • Posts: 7
Re: Company field not allowing a . (dot)
« Reply #2 on: September 21, 2016, 04:22:48 PM »
Thanks, this solved the issue :)
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Company field not allowing a . (dot)
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2