Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-368

validateExtendedType Should Use Dynamic Validation Rules

    XMLWordPrintable

Details

    Description

      AppModel::validateExtendedType needs to know the current CO ID in order to figure out which types are valid. However, $cur_co is attached to the Controller, not the Model.

      The correct way to handle this would be to use CakePHP 2.2's dynamic validation rules

      http://book.cakephp.org/2.0/en/models/data-validation.html#dynamically-change-validation-rules

      to attach a suitable rule to the model, possibly in AppController. Currently, AppController::beforeFilter explicitly passes the CO ID to the Identifier model (the only model that currently supports Extended Types).

      Attachments

        Issue Links

          Activity

            People

              benn.oshrin@at.internet2.edu Benn Oshrin
              benn.oshrin@at.internet2.edu Benn Oshrin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: