Add error template option to the validator api