Added validation for Post model