Closed (works as designed)
Project:
MaxLength
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 May 2020 at 14:04 UTC
Updated:
8 Oct 2022 at 05:03 UTC
Jump to comment: Most recent
Comments
Comment #2
dakwamineSame here, using adminimal theme. The counter works, but there is no validation.
I have tried with a user with no bypass permission.
Maxlength 1.0.0-beta5
Core 8.8.3
Comment #3
dakwamineSome more info:
This occurred on formatted text, CKEditor. One would expect a JS validation to stop the form submit when the counter is negative, but it does not. To mitigate the issue, the Force truncate and Safe truncate html options must be used.
On raw text, all is fine.
Comment #4
renrhafUsing the patch in https://www.drupal.org/project/maxlength/issues/2916687 allows to set a Javascript "soft" limit, but we should add an option to defined if a server side validation should occur. The use case is if we want, for example, to add a maximum text length restriction on a existing field, whose content may already be greater than the limit. We can not use truncate text here as we would loose data without warning the editor.
Comment #5
cedeweyI've updated the issue title and description for clarity. I've marked it as a feature request, though there's an argument to be made that it's a bug.
Comment #6
cedeweyComment #7
cedeweyThis feature request is no longer relevant per #2916687: Soft limit does not work on plain text fields because the Maxlength HTML attribute is used so marking closed, works as designed.