Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
5.3
Description
XmlText fieldtype validates input value in eZ\Publish\Core\FieldType\XmlText\Input\EzXml class, where InvalidArgumentException is thrown if the input is not valid. This will result in the exception when FieldType::acceptValue() is called.
RichText validates the input (external and internal formats) directly in FieldType::acceptValue() method. External format validation in this fieldtype should actually be removed as it is redundant if (converted) internal format is also validated.
It is not the job of FieldType::acceptValue() to perform validation, that should instead happen in the FieldType::validate(), where an array of ValidationError objects should be returned if validation fails.