Opinions? Is it best practice to include validation in a BO setter. I'm just
starting to add this kind of stuff to my objects and i'm wondering how
others handle it, and why.
<cffunction name="setIntScope" access="public" returntype="VOID"
output="false">
<cfargument name="intScope" type="numeric" required="true" />
<cfset arguments.intScope = fix(arguments.intScope) />
<cfif (arguments.intScope LT 0) OR (arguments.intScope GT 2)>
<cfset throwException("WebStudio Validation Error", "A scope value of
#arguments.intScope# is not valid.", "Valid values are 0: Site, 1: Section,
and 2: Page<br>Scope refers to the scope of the content query executed for
this content container.")>
</cfif>
<cfset variables.instance.intScope = arguments.intScope />
</cffunction>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words '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]