[null, 'Translation key or message for invalid value', 'string'], ]; /** * Checks if the given value is a valid text (contains no XML tags). * * Be aware that the value of this check entirely depends on the output context. * The validated text is not expected to be secure in every circumstance, if you * want to be sure of that, use a customized regular expression or filter on output. */ public function isValid(mixed $value): void { if ($value !== strip_tags((string)$value)) { $this->addError($this->translateErrorMessage($this->message), 1221565786); } } }