Validation for post form. Added flash section.