Re: Date Validation?
От | Josh Berkus |
---|---|
Тема | Re: Date Validation? |
Дата | |
Msg-id | web-85443@davinci.ethosmedia.com обсуждение исходный текст |
Ответ на | Re: Date Validation? ("Richard Huxton" <dev@archonet.com>) |
Ответы |
Re: Date Validation?
|
Список | pgsql-sql |
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 informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco
В списке pgsql-sql по дате отправления: