Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-4629

Validation pattern in fckEditor is not working as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • 4.5.x
    • 4.4.6, 4.5.4
    • fckeditor
    • None
    • Tested on a 4.4.6 and 4.5.4. But i guess that the problem is on every 4.4.x and 4.5.x

      Add a validation pattern like ".

      {1,100}

      " to a fckEdit control.
      You expect that the user can enter 100 chars.

      But there are 2 issues:
      1. Enter the letter "a", press enter, then enter another letter like "a", the validation message shows up and tell you

      The value '<p>a</p>
      <p>a</p>' is not valid for the field [Text] on the tab [Text]!

      Even with the <p> tags the whole text size is less that 100 chars. The problem comes from the new line.

      2. The second issue is maybe more "acceptable".
      From a user point of view 100 chars is 100 chars without the "hidden" HTML code added by the RTE.
      But a user can enter only 80 chars but the validation will be triggered because there is 25 hidden HTML chars in the text.

      It would be great if the validation doesnt care about the HTML.

        Acceptance criteria

              Unassigned Unassigned
              sschmitt Samuel Schmitt
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:

                  Bug DoR
                  Task DoD