custom validator/ bug fix