Fixes custom error message for custom validator

Fixes #429