Added custom message support to the type constraint