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

Setting database field type Number to required should allow zero value

XMLWordPrintable

    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • wip-MDL-53402-master
    • Hide
      1. Enter / Create a course.
      2. Add a database activity.
      3. Add each of the field types that can be set as required.
      4. Save the template.
      5. Try entering in '0' where possible in the fields.
      6. Check that entering in '0' does not result in the page not being submitted.
      Show
      Enter / Create a course. Add a database activity. Add each of the field types that can be set as required. Save the template. Try entering in '0' where possible in the fields. Check that entering in '0' does not result in the page not being submitted.

      I am unable to input Database activity field type Number to zero when it is set to required.
      As zero is a valid number it seem better to use the isset() function and not the !empty() function, which consider zero value is empty.

            abgreeve Adrian Greeve
            nadavkav Nadav Kavalerchik
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Jake Dallimore Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.