- Posts: 25
- Thank you received: 1
Not allow special characters in text Custom Field
- nojunkgoodfood
-
Topic Author
- Offline
Less
More
10 years 11 months ago #216584
by nojunkgoodfood
Not allow special characters in text Custom Field was created 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
-- 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.
10 years 11 months ago #216601
by nicolas
Replied by nicolas on topic Not allow special characters in text Custom Field
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:
www.regular-expressions.info/tutorial.html
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
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