Posted by bluepresley on November 15, 2007 at 5:53am
I'm not sure if I'm posting in the right place, but here goes.
I created a very simple CCK based node which is use to add web sites links to a database. there is the "name", the actual "web address", and "body" describing the link and site.
I want to make sure I can validate the "website address" field as a real website (ie www.example.com) instead of someone putting garbage in there.
I have the regular expression script to handle the data, I just don't konw where to stick it. I know drupal has an internal form error handling engine I can hook into. Can someone tell me how this is done?
thanks,
blue
Comments
link module?
I believe that the link module does a lot of this already. Or at least it did (I think I made a patch to remove it so that it could handle more exotic urls like hosts on an intranet or relative paths - I forget what happened to that).
Anyway, if you look at the code in the different revisions of the link module you should be able to find what you need - http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/link/link.m...
--
Knaddisons Denver Life | mmm Chipotle Log | The Big Spanish Tour
knaddison blog | Morris Animal Foundation
link module
a novel idea :) I should have thought about that. I'll check it out. Hopefully I can stop coding it from scratch. thanks for the info!