Skip to main content

Not allow special characters in text Custom Field

More
10 years 11 months ago #216584 by nojunkgoodfood
-- 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: !@#$%^&*() 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 or Create an account to join the conversation.

More
10 years 11 months ago #216601 by nicolas
Hi,

Sure, no problem.
Edit your custom field via the menu System>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
The following user(s) said Thank You: nojunkgoodfood, marcovanlennep

Please Log in or Create an account to join the conversation.

Time to create page: 0.156 seconds
Powered by Kunena Forum