- Posts: 53
- Thank you received: 1
Regexp on custom order item
4 years 11 months ago #336084
by matmosis
Regexp on custom order item was created by matmosis
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.3.28
-- Browser(s) name and version -- : Chrome 90.0.4430.212
Hello,
i need a "custom order field" to be exactly 7 char, how can i achive this? with regexp?
i need the same for a custom order field for email value, how is the correct value to enter in the regexp field during "custom order field" configuration?
thank you
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.3.28
-- Browser(s) name and version -- : Chrome 90.0.4430.212
Hello,
i need a "custom order field" to be exactly 7 char, how can i achive this? with regexp?
i need the same for a custom order field for email value, how is the correct value to enter in the regexp field during "custom order field" configuration?
thank you
Please Log in or Create an account to join the conversation.
4 years 11 months ago - 4 years 11 months ago #336085
by Philip
Replied by Philip on topic Regexp on custom order item
Last edit: 4 years 11 months ago by Philip.
Please Log in or Create an account to join the conversation.
4 years 11 months ago #336088
by matmosis
Replied by matmosis on topic Regexp on custom order item
Hello,
i already set up maximun lenght thank you!
what i need is minimum, because my filed must be of 7 char, no more no less
in addition i have another custom filed to enter an email value, and i want hikashop to check that the format is correct (an email value) so i think i need to enter the regexp but i cannot understand how to enter it
can you please provide an example?
thank you
i already set up maximun lenght thank you!
what i need is minimum, because my filed must be of 7 char, no more no less
in addition i have another custom filed to enter an email value, and i want hikashop to check that the format is correct (an email value) so i think i need to enter the regexp but i cannot understand how to enter it
can you please provide an example?
thank you
Please Log in or Create an account to join the conversation.
4 years 11 months ago - 4 years 11 months ago #336089
by Philip
Replied by Philip on topic Regexp on custom order item
Hello,
Correct, forgive me I missed the point, that you need 7 characters no more, no less.
Then, you have to build a regex, you were right, have a look on this Stackoverflow topic.
=> Example :
^[:;,\-@0-9a-zA-Zâéè'.\s]{1,7}$
This regex may be useful for your needs, I add another tips in order to help you to build regex, which is often a job that can be complicated, even for us.
=> Use this online regex tool to test & analyze.
And so, in order to check that your input contains a valid email, you can use this kind of regex ( Stackoverflow link ).
Hope this will help you to achieved what you need.
regards
Correct, forgive me I missed the point, that you need 7 characters no more, no less.
Then, you have to build a regex, you were right, have a look on this Stackoverflow topic.
=> Example :
^[:;,\-@0-9a-zA-Zâéè'.\s]{1,7}$
This regex may be useful for your needs, I add another tips in order to help you to build regex, which is often a job that can be complicated, even for us.
=> Use this online regex tool to test & analyze.
And so, in order to check that your input contains a valid email, you can use this kind of regex ( Stackoverflow link ).
Hope this will help you to achieved what you need.
regards
Last edit: 4 years 11 months ago by Philip.
The following user(s) said Thank You: matmosis
Please Log in or Create an account to join the conversation.
Time to create page: 0.189 seconds