[validation strategies skipped]
I'm not quite sure about the difference between (2) and (3).
>A combination of (2) and (3) might also make sense, where a basic validation
>scheme might take care of existence rules (e.g. 'required') and type
>definitions (e.g. 'must be an integer'), but where more sophisticated
>validation (e.g. must match 'mm/dd/yy') would be left to an external
>validator.
I don't see why "must match 'mm/dd/yy'" shouldn't be part of this
automatically created validator either. And that could as well check
wether the date entered actually is a valid one (e.g. no 31. Apr, 29 Feb
outside leapyears etc.). After all that basically implements the
requirement 'must be a date' which would be in line with
'must be an integer'.
Same could go for all integral types.
And while I'm at it it might come handy if we could somehow describe
some rules which define valid patterns for other types as well.
Last not least I easily can envision the need for dynamically adding
constraint derived from other attributes, e.g. for floats (monetary
values) to require they have no more than 2 fractional digits, being
lower than a certain upper value (e.g. an account balance), defining
relationships between entered values (e.g. one being a multiple of the
other or being between two others etc) and possibly quite a few more
such things.
Or course this is at least in part subject of the application logic.
But having means to generate such code automatically definitely would
come handy.
Since I'm already in 'wish mode':
a generic 'currency module' possibly combined with an 'interest module'
would be rather nice as well. If there is more demand for such things
I'd be happy to help here as I'm currently working on porting something
like that from C/C++ to Java anyway. Knowing others requirements would
help making it of general useability.
If you need more such ideas feel free to mail me... ;-)
Just my thoughts, best,
Michael
--
Vote against SPAM - see http://www.politik-digital.de/spam/
Michael Gerdau email: [EMAIL PROTECTED]
Solution Series: Works for Windows, Publisher and Money
PGP-keys available on request or at public keyserver