validated the text added by addCategory. will be valid for css