add hooks for process.Context to do validation add unit test Signed-off-by: roy wang <seiwy2010@gmail.com>