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

Implement validation mechanisms in persistent derived classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 2.9.2
    • Competencies
    • None
    • 2
    • CBE Sprint 0

      We need the models (persistent classes) to be able to validate themselves. The main reason behind this is that we cannot trust the data that is coming from other sources than web services or forms, for instance data manipulated by a developer, data from other sources such as CSV files, etc...

      The API methods are not the right place to put this validation because the persistent classes can be used directly and enforcing the API use will be very difficult.

      Defining validation within the model is the first step, later on we could re-use the validation definitions in forms, or even in external functions parameters/return definitions.

      When working on this, grep for TODOs related to MDL-51506.

            fred Frédéric Massart
            fred Frédéric Massart
            Damyon Wiese Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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