validate post contents on submission