I have created a custom profile field where I want a user to enter a vaild domain name (like www.mysite.com) at registration.
In the Edit Profile Field->Advanced Settings: form I have selected Regex (Advanced) and placed
^(http|https)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~])*$
The custom field appears on the registration page however it doesn't force the regex validation rule. It does reject registration if the domain name field is empty.
What needs to be done to correct this and enforce the regex validation?
Thanks,
Chris
It doesn't look like a good regex to me.
Besides the fact you should start and end with the same character. (has to be not included in your regex or has to be escaped everytime in regex eg
~^[a-z]+$~ (since tilda is not allowed in url unencoded)