add required directive support and test case