add request context in valid/prepare_callback