Refactored validationClassFor to use old state as well as new state