Creating a form directive with custom validation