Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22900

XmlText and RichText fieldtypes validate input value in the wrong place

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            petar.spanja-obsolete@ez.no Petar Spanja (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: