Created the class TextValidator.