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

Make a standard way to get errors from a webservice and associate them with fields in a form.

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_31_STABLE
    • Epic Link:

      Description

      E.g. If we submit data to a "create_group" function, and the data fails validation, we need to know which field failed validation so we can show an error message next to the appropriate field.

      This probably requires:
      A) Improving the way we return errors from webservices so that (if known) the fieldname is able to be read.
      B) A javascript function to take a list of errors and inject them into a form.

      Worth looking at http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#errors

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              moodle.com moodle.com
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie, Jake Dallimore, Jun Pataleta, Ryan Wyllie, Juan Leyva, Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: