Added support for custom validators.