Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6DHifa92481 for ; Fri, 13 Jul 2001 13:44:41 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 85443; Fri, 13 Jul 2001 10:44:39 -0700 From: "Josh Berkus" Subject: Re: Date Validation? To: "Richard Huxton" , "Josh Berkus" , X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Fri, 13 Jul 2001 10:44:39 -0700 Message-ID: In-Reply-To: <006401c10bbd$effc5320$1001a8c0@archonet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200107/175 X-Sequence-Number: 3970 Richard, > Out of curiosity Josh, why aren't you validating in PHP? - only takes > a > couple of lines there. We are. It's just that all other validation takes place inside the PL/pgSQL functions in order to keep all the business logic in the database. Having one form of validation in the interface (PHP) and the rest in the function can cause the user to go through multiple validation errors, which is especially frustrating if the second validation error is fatal. Example: USER: '2001-06-31' PHP Validation: '2001-06-31 is not a valid date.' USER: '2001-06-30' PL/pgSQL FUNCTION: 'Your session has timed out. Please log back in.' USER: '%^#$&*&#!!!' See what I mean? Not a showstopper, but it mars our otherwise user-friendly validation formula. -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco