Commit 493d4497 authored by catch's avatar catch
Browse files

Issue #3533926 by alexpott: Config of the type plural_label can never be valid...

Issue #3533926 by alexpott: Config of the type plural_label can never be valid due to the label constraint

(cherry picked from commit 89abd7a0)
parent d731332e
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -84,6 +84,15 @@ required_label:
plural_label:
  type: label
  label: 'Plural variants'
  constraints:
    Regex:
      # Normally, labels cannot contain invisible control characters. In this particular
      # case, an invisible character (ASCII 3, 0x03) is used to encode translation
      # information, so carve out an exception for that only.
      # @see \Drupal\views\Plugin\views\field\NumericField
      pattern: '/([^\PC\x03])/u'
      match: false
      message: 'Labels are not allowed to span multiple lines or contain control characters.'

# Internal Drupal path
path:
+0 −9
Original line number Diff line number Diff line
@@ -119,15 +119,6 @@ views.field.numeric:
    format_plural_string:
      type: plural_label
      label: 'Plural variants'
      constraints:
        Regex:
          # Normally, labels cannot contain invisible control characters. In this particular
          # case, an invisible character (ASCII 3, 0x03) is used to encode translation
          # information, so carve out an exception for that only.
          # @see \Drupal\views\Plugin\views\field\NumericField
          pattern: '/([^\PC\x03])/u'
          match: false
          message: 'Labels are not allowed to span multiple lines or contain control characters.'
    prefix:
      type: label
      label: 'Prefix'