Added the possibility to get the validations rules that failed.
Refactoring some code in validation failed rules setup.