Improve assertion message when validation fails