getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 168 forks source link

[3.6.0-rc.2] Missing max/min length indicator Textarea #3861

Closed doldenroller closed 3 years ago

doldenroller commented 3 years ago

Describe the bug Textareas with length validation (min- or maxlength) are missing the indicator on how the Characters are limited

To Reproduce
Steps to reproduce the behavior:

  1. Add length validation to Textarea in Blueprint
intro:
  label: Intro
  type: textarea
  maxlength: 160

Screenshots
textarea

Kirby Version
3.6.0-rc.2

afbora commented 3 years ago

textarea and some fields doesn't have min and max prop but have minlength and maxlength:

https://github.com/getkirby/kirby/blob/develop/panel/src/mixins/forms/counter.js#L26-L27

distantnative commented 3 years ago

@bastianallgeier was there a reason for the distinction or should we treat min and max as aliases?

bastianallgeier commented 3 years ago

I wonder at which point we remove this at all in 3.6

afbora commented 3 years ago

Related PR: https://github.com/getkirby/kirby/pull/3224

bastianallgeier commented 3 years ago

Ok, I got a fix for it. We should definitely create an alias

distantnative commented 3 years ago

Yes, overlooked it when moving this all into a mixing in https://github.com/getkirby/kirby/commit/af9c4afa99772002a6e381981003442df8ea051a#diff-a1387a637c7ded8fe469c197369f58dbcfeb7ce9f7157223cfb3834ee2d45e04

bastianallgeier commented 3 years ago