Custom field validation in registration

  • Posts: 180
  • Thank you received: 3
  • Hikaserial Standard Hikashop Business
6 days 12 hours ago #366386

Hello, i have a couple of custom fields, that need validation:
1. How to restrict special characters in field (like è,é,ê,ě,ẽ,ē,ë,ů,ű,ũ,ǔ,ü,ú,ù,û)?
2. How to restrict parts or word in field? For example if any word in field contains "iene" or "yte" or "aite", etc. it should not allow
3. How to allow only 11 characters in field? And those 11 characters can be only numbers.

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

  • Posts: 83541
  • Thank you received: 13516
  • MODERATOR
6 days 9 hours ago #366387

Hi,

You can do all that with the "Regular expression check" setting of your field if the "required" setting of the field is activated.
In it, you can provide a regular expression to restrict what can be provided by the user.
Here are the regular expressions ChatGPT proposes for each of your restrictions:
chatgpt.com/share/67e55938-4a64-8003-a51b-e4e17f937501
If you want to learn how to write regular expressions, you can look here:
www.regular-expressions.info/tutorial.html

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

Time to create page: 0.046 seconds
Powered by Kunena Forum