Solved problem with validator