Have a method called setemailaddress() that calls another method that 
validates the email address. If it validates, then save otherwise return an 
error message. My listserver CFC does this (among other things). One of the 
powers of CFCs is the ability to have clean organization of code.


> I'm in the brainstorming stage of rewriting one of my apps in CFCs from
> the current procedural + UDF code.  I was wondering how y'all handled
> data validation, did you do it within the main class or do it
> externally?  Specifically, would you:
>
> * have a method called setEmailAddress() that returned false if the
> passed data was not a valid address
>
> or
>
> * have a method called setEmailAddress() and validate the address format
> *before* saving it?
>
> Thanks.
>
> -- 
> Damien McKenna - Web Developer - [EMAIL PROTECTED]
> The Limu Company - http://www.thelimucompany.com/ - 407-804-1014
> #include <stdjoke.h>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226432
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to