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.