Relocated add post validation code.