Replies: 1 comment 4 replies
-
You see in the code i already wrap with slashes... |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Prior - I may have set'Attribute identifier' wrongly as delivery_date... - this is bot chat I am talking about, and I am using LHC 4.52; so here is the problem:
I have chosen 'Collect custom attribute' in trigger, and used /^(0[1-9]|[12][0-9]|3[01]).(0[1-9]|1[0-2]).(\d{4})$/ as Preg match rule. Now when visitor inputs the date as DD.MM.YYY within the allowed period, or if I symplify the rule and let visitor response with any date, chat returns 'Your message does not match required format!' message from bot.
error_log complains:
[19-Jan-2025 12:00:08 Asia/Ashgabat] PHP Warning: preg_match(): Unknown modifier '^' in /home/patmayur/sohbet.3-damja.net/lib/core/lhgenericbot/lhgenericbotworkflow.php on line 869, not recognizing '^' as modifier;
And lhgenericbotworkflow.php 869 line is as:
869 } else if (isset($eventData['content']['preg_match']) && !empty($eventData['content']['preg_match']) && $eventData['content']['preg_match'] != 'validate_email' && !preg_match('/' . $eventData['content']['preg_match'] . '/',$payload)) { // Preg match validation
870 $invalidMessage = true;
Hopefully, anyone will suggest?
Beta Was this translation helpful? Give feedback.
All reactions