Defect #12833
Input fields restricted on length should have maxlength parameter set
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | UI | |||
Target version: | 2.2.2 | |||
Resolution: | Fixed | Affected version: |
Description
When entering the subject of a ticket/issue or writing a comment in the timelog, you can enter as many characters in the input field as you want. But if you entered more then 255 characters, this will give an error later when sending it to the redmine instance ("... too long (maximum 255 characters)").
It would be better if the HTML input field already has the maxlength parameter set to 255 then. Having this parameter set, you cannot enter more than maxlength characters into the input field. Thus, the user would immediately recognize that he cannot enter more characters instead of getting an error later when he already typed the too long input.
I just checked for the 2 mentioned input fields, there are probably a lot more of them.
Associated revisions
Input fields restricted on length should have maxlength parameter set (#12833).
History
#1
Updated by Daniel Felix over 9 years ago
- File setMaximumLenght.diff
added
Hi,
I've attached a small patch which corrects this for timelog comments and issue subjects.
Best regards,
Daniel
#2
Updated by Harald Glock over 9 years ago
Thanks Daniel.
Applied the patch with small change to redmine-2.1.4 (line no in app/views/timelog/_form.html.erb has changed since 2.1.4) and it works as expected.
Hope it will make it into redmine.
#3
Updated by Toshi MARUYAMA over 9 years ago
- Category set to UI
#4
Updated by Daniel Felix over 9 years ago
- Status changed from New to Resolved
- Target version set to Candidate for next minor release
- Resolution set to Fixed
#5
Updated by Daniel Felix over 9 years ago
- Target version changed from Candidate for next minor release to 2.2.2