Last modified: 2014-02-12 23:35:46 UTC
Many modules may require user to specify a "langcode", which we should provide in the base. Invalid characters (validated as not matching ^[a-z:_\-]+$ or something similar by the Language classes) will cause an error to be reported. The base class will autodetect if any params have the 'langcode' type and report the that module may return this error (similar to 'badcontinue')
Commited Gerrit change #57047
https://gerrit.wikimedia.org/r/57047 (Gerrit Change I03008949d964dc7a122e2fce2deae19c997887d0) | change ABANDONED [by Umherirrender]
Abandon: There are different validation methods in the Language class for different use cases and work flows, so this should be done inside the modules, which than can choose the necessary validation. In my opinion this is a WONTFIX, because it cannot provided by a base class. Other ideas, when somebody want this in the base class: - Provide a way, to get a language object for the param from given language code. Avoids factory calls inside the module. - Allow a default value to get the user or the content language for the param. Avoids is_null checks inside the modules.