Combined the error message into the custom directive.