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

Setting database field type Text to required should allow input of a single char "zero" value

    XMLWordPrintable

Details

    • MOODLE_30_STABLE

    Description

      Unable to use Number field type to store zero value when set to "required" (see MDL 53402), I tried to use a Text field type to input a single zero character, but could not, as both field types (Number and Text) use the same base data_field_base::notemptyfield() with empty value validation using "!empty($value)"

      As with MDL-53402, suggesting to use isset($value) instead of !empty($value).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nadavkav Nadav Kavalerchik
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: