Relocated edit post validation code.