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

Required checkbox field raises a validation error if not checked

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Medium Medium
    • QA tracked issues
    • 1.3.0
    • Operating System: Debian 8
      PHP Version: 5.6.14-0+deb8u1
      Database and version: Mysql 5.5.46-0+deb8u1
      Browser (and version): Firefox

    Description

      If we create a content from a content type that has a required checkbox fieldtype, and we leave the checbox unchecked, a notification error occurs

      An error occurred while publishing the draft
      

      And the response in dev tools is

      {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":400,"errorMessage"
      :"Bad Request","errorDescription":"Value for required field definition 'chk' with language 'eng-GB' is
       empty"}}
      
      Steps to reproduce
      • Create a content type that as a checkbox fieldtype. Make it "required"
      • Create a content of previous content type. Don't checkj the checkbox
      • Click on "Publish" button

      Maybe it doesn't make sense to create a checkbox as required, since it's state is either checked or unckeched. But if ezplatform allows it, then this situation should be taken care on a more pleasant way.

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulo.nunes-obsolete@ez.no Paulo Nunes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: