assign alert classes to validation errors. fixes #29