[Skip to main content](#vessel-content)

#   Regexp on custom order item

##

- **[matmosis](/forum/user/61552-matmosis "View matmosis's Profile")**
- [![matmosis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61552-matmosis "View matmosis's Profile") Topic Author
- [ Offline](/forum/user/61552-matmosis)

Less More

- Posts: 53
- Thank you received: 1
-
-

5 years 3 weeks ago [\#336084](#336084) by [matmosis](/forum/user/61552-matmosis "View matmosis's Profile")  *[Regexp on custom order item](/forum/4-how-to/903269-regexp-on-custom-order-item#336084 "-- 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 &quot;custom order field&quot; 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 &quot;custom order field&quot; configuration?  thank you")* was created by *[matmosis](/forum/user/61552-matmosis "View matmosis's Profile")*

-- 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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMzI2OS1yZWdleHAtb24tY3VzdG9tLW9yZGVyLWl0ZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

5 years 3 weeks ago -  5 years 3 weeks ago [\#336085](#336085) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Regexp on custom order item](/forum/4-how-to/903269-regexp-on-custom-order-item#336085 "-- 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 &quot;custom order field&quot; 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 &quot;custom order field&quot; configuration?  thank you")*

Hello,

No need to regex, see my screenshot to see how to set your Custom field with some adjustements :
[ ![alt](https://i.ibb.co/JRdzrcg/cf-cfg.png) ](https://i.ibb.co/JRdzrcg/cf-cfg.png "alt")

The most important is of course the red bordered part in the screenshot that prevent to enter more than **7** characters.
Hope this will fit your needs.

Regards

Last edit: 5 years 3 weeks ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMzI2OS1yZWdleHAtb24tY3VzdG9tLW9yZGVyLWl0ZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[matmosis](/forum/user/61552-matmosis "View matmosis's Profile")**
- [![matmosis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61552-matmosis "View matmosis's Profile") Topic Author
- [ Offline](/forum/user/61552-matmosis)

Less More

- Posts: 53
- Thank you received: 1
-
-

5 years 3 weeks ago [\#336088](#336088) by [matmosis](/forum/user/61552-matmosis "View matmosis's Profile")  Replied by *[matmosis](/forum/user/61552-matmosis "View matmosis's Profile")* on topic *[Regexp on custom order item](/forum/4-how-to/903269-regexp-on-custom-order-item#336088 "-- 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 &quot;custom order field&quot; 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 &quot;custom order field&quot; configuration?  thank you")*

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMzI2OS1yZWdleHAtb24tY3VzdG9tLW9yZGVyLWl0ZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

5 years 3 weeks ago -  5 years 3 weeks ago [\#336089](#336089) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Regexp on custom order item](/forum/4-how-to/903269-regexp-on-custom-order-item#336089 "-- 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 &quot;custom order field&quot; 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 &quot;custom order field&quot; configuration?  thank you")*

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](https://stackoverflow.com/questions/10518979/setting-a-minimum-maximum-character-count-for-any-character-using-a-regular-expr)** topic.
**=&gt; 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.
**=&gt;** Use this online **[ regex tool](https://regex101.com/)** to test &amp; analyze.

And so, in order to check that your input contains a valid email, you can use this kind of regex (**[ Stackoverflow link](https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression)**).

Hope this will help you to achieved what you need.
regards

Last edit: 5 years 3 weeks ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [matmosis](/forum/user/61552-matmosis "View matmosis's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMzI2OS1yZWdleHAtb24tY3VzdG9tLW9yZGVyLWl0ZW0/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.110 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
