Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-848

Misplaced field format validation code

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 5.1.2
    • Fix Version/s: 5.2.0
    • Component/s: Data Management
    • Labels:
      None
    • Additional information:
      Hide

      This "regexp" option is specified in unit config file, like "core/units/users/users_config.php" in "Fields" array, e.g.

      'Fields' => Array (
      'Login' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^user.*$/', 'default' => ''),
      ),

      This will force all new users to have "user" in front of their login name to be entered before registration could continue.

      Show
      This "regexp" option is specified in unit config file, like "core/units/users/users_config.php" in "Fields" array, e.g. 'Fields' => Array ( 'Login' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^user.*$/', 'default' => ''), ), This will force all new users to have "user" in front of their login name to be entered before registration could continue.
    • Change Log Message:
      Moved "regexp" field option processing to kDBItem class
    • External issue ID:
      1047
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      In-Portal has ability to validate value in the field using given regular expression (regexp option in field definition).

      All works fine, unless you need to change field value (not on form, but in code) before validation takes place.

      To solve that problem I'm proposing to move processing of "regexp" option from kFormatter class into kDBItem class.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: