test + refactoring

Wrote a test + refactor validator (before, when I wrote "$shithttp://vk.com", it passed)