I would think save() would want to validate, but you would want a separate method for it. So, yes, save() would validate, but would call validate(). This allows other methods to use the logic as well.
======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Phillip Cave > Sent: Friday, October 03, 2003 7:51 AM > To: [EMAIL PROTECTED] > Subject: [CFCDev] Data validation > > > > Where is the best place to handle data validation in an > object? Should an object's Save() method be responsible for > validating it's internal members before actually saving or > should the calling program call a Validate() method before > attempting to save? > > Any advice is appreciated. > > Thanks, > Phillip > > -- > > Phillip Cave > Director, ColdFusion Development > Macromedia Certified ColdFusion Developer > Carol/Trevelyan Strategy Group > 202.448.5212 > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[EMAIL PROTECTED] > ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]