Modified validation code to collect all the errors and report them all.