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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5.5, 3.6
    • 3.6.5, 3.7.1
    • Forms Library
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-65506-master
    • 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
    • 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

        1. advcheckbox_tester.php
          0.5 kB
          Shamim Rezaie
        2. image-2019-05-08-08-48-41-945.png
          16 kB
          Amaia Anabitarte
        3. MDL-65506.jpg
          56 kB
          Anna Carissa Sadia
        4. Screenshot 2019-05-07 at 11.50.10.png
          19 kB
          Marina Glancy

        Issue Links

          Activity

            People

              rezaie9 Shamim Rezaie
              amaia Amaia Anabitarte
              Jake Dallimore Jake Dallimore
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Anna Carissa Sadia Anna Carissa Sadia
              Jake Dallimore, Mathew May, Mihail Geshoski
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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