Added validation features to the "new" and "edit" posts views