validate handler