'Checks unique constraints on the model and raises ``ValidationError``
if any failed.'

def validate_unique(self, exclude=None):

    (unique_checks, date_checks) = self._get_unique_checks(exclude=exclude)
    errors = self._perform_unique_checks(unique_checks)
    date_errors = self._perform_date_checks(date_checks)
    for (k, v) in date_errors.items():
        errors.setdefault(k, []).extend(v)
    if errors:
        raise ValidationError(errors)
