Added title validation to post model and added relative flash notice