Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Validate bug when no 'www' entered in URL?

Quote Reply
Validate bug when no 'www' entered in URL?
I've found a problem when validating links that have been submitted with an incomplete URL. For example;

If a user submits this as their url:
newurl.co.nz

instead of:
www.newurl.co.nz

in the admin area, when you go to click on the 'validate' link to view the submitted site, it puts in...

http://www.mydomainname.co.nz/cgi-bin/newurl.co.nz

...as the link to validate. It it simply a matter of checking the submission? It would then have to cover ftp, http, https etc too though I guess.

Cheers,

Regan.

Quote Reply
Re: Validate bug when no 'www' entered in URL? In reply to
The error checking should take place prior to submitting the link to the Validate table. Check your Validate.def file and make sure that you have '^http|ftp|mailto' in the valid expression column in the URL field.

Regards,

Eliot Lee
Quote Reply
Re: Validate bug when no 'www' entered in URL? In reply to
Hi Eliot,

Nope, it's not there - thanks for that, I'll add it in. If I also want to include https would I need to add it to the values, or would the http value do the trick?

Regan.

Quote Reply
Re: Validate bug when no 'www' entered in URL? In reply to
Nope...you do not need to add https since the ^ means "starting with" meaning that if the inputted value starts with http, then it can be added...no need to add the s.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: Validate bug when no 'www' entered in URL? In reply to
Thanks Eliot! And thanks for all your help. My site is live (but still very much an infant) thanks to your help. http://www.newzealand.co.nz

Quote Reply
Re: Validate bug when no 'www' entered in URL? In reply to
You're welcome.

Your site is coming along very nicely. Good luck!

Regards,

Eliot Lee