Can I change the syntax for URL field validation?

fshock 08 Sep, 2009

I am using 3.1 RC5 and I have a form with a field for the user to enter a URL. It has URL validation so it will only allow users to enter a URL with the syntax http://www.whatever.extension.

Is there a way to edit the required syntax so that users can enter URLs without the http://?

GreyHead 08 Sep, 2009
Hi fshock,

Only by writing a custom validation (a fairly simple piece of JavaScript is needed).


PS without the http:// it technically isn't a valid URL which is why the default URL validator won't allow it.
fshock 11 Sep, 2009
Hello Thanks,

Would anyone be able to write that fairly simple javascript code? Please let me know even if you have to charge for it.

GreyHead 11 Sep, 2009
Hi fshock,

It shouldn't be hard to find, there are example of new validators in the forums here and a tool like regex magic will create the critical line for you.

Normally I'd be happy to help out but right now I'm already over-stretched with project work.

This topic is locked and no more replies can be posted.