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

FieldValueValidator -> $validationErrors

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • 1.11.0
    • None
    • None
    • Debian 8, Apache 2.4, PHP 5.6

    Description

      With ezplatfrom 1.11.0 in class vendor/ezsystems/repository-forms/lib/Validator/Constraints/FieldValueValidator.php in method validate($value, Constraint $constraint) there is a piece of code

      $validationErrors = [];
      if ($fieldType->isEmptyValue($fieldValue)) {
      if ($fieldDefinition->isRequired)

      { $validationErrors = [ new ValidationError( "Value for required field definition '%identifier%' with language '%languageCode%' is empty", null, ['%identifier%' => $fieldDefinition->identifier, '%languageCode%' => $value->field->languageCode], 'empty' ), ]; }

      } else

      { $validationErrors = $fieldType->validateValue($fieldDefinition, $fieldValue); }

      With this code, I must insert default value for the filedtype that are request ONLY if the class already existed.

      I upgrade ezplatform from 1.10.1 to 1.11.0

      Attachments

        Activity

          People

            Unassigned Unassigned
            yol4o yol4o
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: