Created lines 12 and 13 to show an error message if the fields were not completed or didn't meet the rules as set in the Post model