I am getting a "Must be a valid string" error on the billing name field in a charge form if the name contains a hyphen.

Any idea where that is coming from? I can't track it down.

  • Did you ever resolve this as we have the same issue?
    – paulcripps
    Jan 6 '16 at 18:48
  • Nope, sorry. It kind of got put on the back burner because of other priorities but I will need to get it fixed at some point.
    – Tim Print
    Jan 16 '16 at 19:54
  • I got an email back from Charge, , preg_match("/[^\pL\d\s\-]/u", $val, $matches);
    – paulcripps
    Jan 18 '16 at 10:19

I got an email back from Charge, you need to edit That's just one change in mod.charge.php, changing the regex to :

preg_match("/[^\pL\d\s\-]/u", $val, $matches);

They are working on a fix for this at the moment.

  • Good info, thanks for posting it back here.
    – Tim Print
    Jan 20 '16 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.