Re: field validation (was Re: COBOL/DB2 Date edit question)
- From: Howard Brazee <howard@xxxxxxxxxx>
- Date: Tue, 14 Aug 2007 08:42:00 -0600
On Tue, 14 Aug 2007 16:57:43 +0300, Binyamin Dissen
<postingid@xxxxxxxxxxxxxxxxxx> wrote:
There are two kinds of validations, syntax and appropriateness.
An amount must be numeric (syntax) and be within a certain range
(appropriate).
February 30th fails on syntax, while Mar 23rd may fail due to being in the
wrong quarter, or wrong day of the week.
Quite often I see syntax checking of a date that is really a waste of
resources - when it is followed by appropriateness checking that will
fail it anyway.
Part of this is our CoBOL background, where we check to see if a
denominator is zero before we do division, because that is easier than
handling the error if it is zero. (Even if we expect that the number
isn't zero). All the checking ahead of time every time uses up
resources that aren't needed with good exception handling.
An other edit is the inappropriate edit - when I enter my 9-digit zip
code on a web page and the program tells me to enter my zip code
correctly. This is especially irritating when the database can
accept any sized postal code (handling foreign postal codes), but
notices that I'm from the U.S., so I must not know my 9-digit zip
code.
Why are they counting digits? Because editing is Right and Proper?
.
- Follow-Ups:
- Re: field validation (was Re: COBOL/DB2 Date edit question)
- From: Pete Dashwood
- Re: field validation (was Re: COBOL/DB2 Date edit question)
- References:
- COBOL/DB2 Date edit question
- From: Graham Hobbs
- Re: COBOL/DB2 Date edit question
- From: Pete Dashwood
- Re: COBOL/DB2 Date edit question
- From: Graham Hobbs
- Re: COBOL/DB2 Date edit question
- From: Pete Dashwood
- Re: COBOL/DB2 Date edit question
- From: Michael Mattias
- Re: COBOL/DB2 Date edit question
- From: Graham Hobbs
- Re: COBOL/DB2 Date edit question
- From: LX-i
- Re: COBOL/DB2 Date edit question
- From: Pete Dashwood
- Re: COBOL/DB2 Date edit question
- From: LX-i
- field validation (was Re: COBOL/DB2 Date edit question)
- From: Frank Swarbrick
- Re: field validation (was Re: COBOL/DB2 Date edit question)
- From: Binyamin Dissen
- COBOL/DB2 Date edit question
- Prev by Date: Re: field validation (was Re: COBOL/DB2 Date edit question)
- Next by Date: Re: COBOL subscript range checking
- Previous by thread: Re: field validation (was Re: COBOL/DB2 Date edit question)
- Next by thread: Re: field validation (was Re: COBOL/DB2 Date edit question)
- Index(es):
Relevant Pages
|