Fixed a regression with ValidationError under Django 1.6

This should work for older Django versions as well as 1.6