07-06-2009, 01:15 PM
|
#5 (permalink)
|
|
The Addict
Join Date: Nov 2007
Location: USA
Posts: 256
Thanks: 7
|
This sort of seems like overkill to use exceptions. Personally I just use a string.
PHP Code:
if(!validDate) {
errorMsg += "problem with date<br />";
}
...
if(errorMsg == "") {
// valid input continue with form
} else {
// show error msg for bad input
}
|
|
|
|