I just did some work in the validation area and it occurs to me how
much work has yet to be done. It is definitely one of our most
critical features that users go "ooh" and "ahh" over.
Code wise, its's one of those areas where the hardest part is being as
thorough as possible. I personally haven't been very thorough in my
work there and have just been adding validations as they occur to me
and most often without tests. Definitely shame on me.
I just added a new class, ValidationAssertions, which will check the
ValidationFailedException failed exception thrown from the
ConfigurationFactory on depoy. It makes sure all the expected
validation issues were spotted, that there are i18n messages for each
message key, that there are the required three levels of messages, and
that when formatted there are no unfilled "{0}" sections. We get bit
by that last one a lot.
We really should add tests for all the checks/messages we have.
There are also likely a ton of validations we don't do and should. We
should also get a list of all the annotations and make sure we have
validations for each of them and add the ones where we don't.
Thoughts? Volunteers?
-David