My aggregate root is "Post" and sub aggregate is "Comment". In my database I have a table called "ForbiddenWords" with one column "Name" (it contains words for example: "sex", "porn"). If someone wants to add a comment, he can't use forbidden words. I need to create a class "ForbiddenWords" to validate a comment. Is this class a Value Object?
A value object is an object without identity. According to your description, a forbidden word is a value object.
For example, you would not be able to distinguish in your table two rows with the same word. Moreover if you would change a word, it would be different word with no relation to the previous one (the identity would not persist after across the changes).