Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65506

Form element advcheckbox does not support 'required' rule (Error message marking a required checkbox custom field)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.5, 3.6
    • Fix Version/s: 3.6.5, 3.7.1
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      Hide
      1. Copy the file advcheckbox_tester.php into your Moodle root directory
      2. Visit [MOODLE_URL]/advcheckbox_tester.php in your browser
      3. Select the checkbox
      4. Verify that you don't see any validation error
      5. Deselect the checkbox
      6. Verify that you don't see any validation error
      7. Submit the form
      8. Verify that you don't see any validation error
      Show
      Copy the file  advcheckbox_tester.php into your Moodle root directory Visit [MOODLE_URL] /advcheckbox_tester.php in your browser Select the checkbox Verify that you don't see any validation error Deselect the checkbox Verify that you don't see any validation error Submit the form Verify that you don't see any validation error
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-65506-master
    • Sprint:
      Internationals - 3.8 Sprint 1

      Description

      If a checkbox custom field is marked as required, moodle shows a message when marked "You must supply a value here.". You can save the value of the checkbox enabled or disabled. This happens for user and course custom fields.

      I guess for checkbox required attribute means only enable value would be accepted during validation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rezaie9 Shamim Rezaie
              Reporter:
              amaia Amaia Anabitarte
              Peer reviewer:
              Jake Dallimore
              Integrator:
              Sara Arjona (@sarjona)
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Jul/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 26 minutes
                  1d 26m