Validation of the class Post