On Wed, 3 Nov 2004 09:44:52 -0800, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> > IMHO, a strong input validation covers bussiness validation already, and
> > database provides extra validation for data-integrity. I think they are
> > enough, aren't they?
> 
> Input validation can't cover business validation, unless your
> definition of input validation includes the definition of business
> validation, and mine doesn't.  The unique username question is a
> perfect example.  If you think that
> 
> 1) doing a database call in input validation; or
> 2) letting the DB throw a unique key error and decyphering it
> 
> is a good way to go, we have a fundemental disagreement.  I personally
> think that both of those options are horrible.  The first forces your
> UI controller to understand business rules, and the latter is just
> nasty to deal with, because chances are good that you'll have to do
> some text parsing to figure out which column is the problem (unless
> you 'know' which column, because there is only one unique key affected
> by the query, of course).

Can you elaborate on how you do unique username type of validation if
you don't let the db throw the unique key error?  Seems like you might
have to implement some locking scheme?

-Phil
----------------------------------------------------------
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]

Reply via email to