added validator for pattern references