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

Setting database field type Number to required should allow zero value

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-53402-master

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/May/16