pre and post validation