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

#   Not allow special characters in text Custom Field

##

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

Less More

- Posts: 25
- Thank you received: 1
-
-

11 years 1 month ago [\#216584](#216584) by [nojunkgoodfood](/forum/user/35905-nojunkgoodfood "View nojunkgoodfood's Profile")  *[Not allow special characters in text Custom Field](/forum/33-customers/879722-not-allow-special-characters-in-text-custom-field#216584 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4 -- PHP version -- : 5.5.26  Hi  I have created a text custom field but when a client enter special characters like: !@#$%^&amp;&#42;() e.t.c. it creates problem in a custom report module I have. Can we not allow to enter them, or make the field to delete them on save?  Thank you")* was created by *[nojunkgoodfood](/forum/user/35905-nojunkgoodfood "View nojunkgoodfood's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.5.26

Hi

I have created a text custom field but when a client enter special characters like: !@#$%^&amp;*() e.t.c. it creates problem in a custom report module I have.
Can we not allow to enter them, or make the field to delete them on save?

Thank you

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

11 years 1 month ago [\#216601](#216601) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Not allow special characters in text Custom Field](/forum/33-customers/879722-not-allow-special-characters-in-text-custom-field#216601 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4 -- PHP version -- : 5.5.26  Hi  I have created a text custom field but when a client enter special characters like: !@#$%^&amp;&#42;() e.t.c. it creates problem in a custom report module I have. Can we not allow to enter them, or make the field to delete them on save?  Thank you")*

Hi,

Sure, no problem.
Edit your custom field via the menu System&gt;Custom fields. There, you can use a regex in the field "Regular expression check".
For example, in your case, this should do the job: Code:

/[a-z0-9 ]+/i

[ www.regular-expressions.info/tutorial.html](http://www.regular-expressions.info/tutorial.html)

The following user(s) said Thank You: [nojunkgoodfood](/forum/user/35905-nojunkgoodfood "View nojunkgoodfood's Profile"), [marcovanlennep](/forum/user/41695-marcovanlennep "View marcovanlennep's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84Nzk3MjItbm90LWFsbG93LXNwZWNpYWwtY2hhcmFjdGVycy1pbi10ZXh0LWN1c3RvbS1maWVsZD90bXBsPW1hcmtkb3du) 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.047 seconds

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