Fixed a regression with ValidationError under Django 1.6