validateExtendedType Should Use Dynamic Validation Rules

XMLWordPrintable

      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).

            Assignee:
            Benn Oshrin
            Reporter:
            Benn Oshrin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: