Pattern validation improvements