feat(core): add pattern validator