added validateFields callback