test(patternValidator): add missing test for exception