Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1807

Retrieve validated input data when a module validates service fields

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.0
    • Fix Version/s: None
    • Component/s: Modules
    • Labels:
      None

      Description

      The Module abstract class component defines a validateService method that returns boolean, and accepts input data in a $vars array. The method is intended to be used to perform top-level error checking, typically using the Input component. However, rules validated through the Input component can have their values changed in 'pre_format' and 'post_format'.

      Since input vars are not returned to the caller, it is not known whether the values have changed, for example, to trim() white space off of input data automatically before validation.


      tl;dr
      Consider allowing the $vars argument to Module::validateService to be passed by reference.

        Activity

        tyson Tyson Phillips (Inactive) created issue -

          People

          • Assignee:
            cody Cody Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: