Added validation for fields of posts in its model