Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textarea without max length #1232

Open
rasstislav opened this issue Aug 26, 2023 · 4 comments
Open

Textarea without max length #1232

rasstislav opened this issue Aug 26, 2023 · 4 comments

Comments

@rasstislav
Copy link

rasstislav commented Aug 26, 2023

Hello,

I have a question.

What if the field is a Textarea? We no longer need to set the maximum number of characters?

if ($field instanceof TextField) {
$field->setMaxLength((int) $this->MaxLength);
}

Thank for response :-)

Related Issues

@michalkleiner
Copy link
Contributor

Hi @rasstislav.
As we don't provide user support or answer generic questions through the issue tracker, can you please clarify if you are reporting a bug or raising an enhancement request or something else?

@rasstislav
Copy link
Author

rasstislav commented Aug 26, 2023

Hi @michalkleiner.
I think it's a mistake, or rather a deficiency, but it can also be labeled as an enhancement. For this purpose, I had to make extension, but I think that it is missing in this module. That's why I marked it as more of a question.

@maxime-rainville
Copy link
Contributor

Just had a look. If you set a maxlength on a text field and tell it to be two rows, you get a <textarea> without a maxlength attribute. You do get a data-rule-maxlength which the front end JS seems to pick up and apply validation for. However, the back end seems to ignore it.

I'd say this is probably a bug, but a low impact one.

@rasstislav
Copy link
Author

Hi @maxime-rainville.
Yes, back end validation is missing. Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants