Method to get validation errors