Change max length of link field link text In order to modify the length of a file field description field I put the following line in settings.php:

$config['file.settings']['description']['length'] = 512;

Now I want to do the same for the link field. How can I change the max length of the link text (without patching the module)?

I think the problem is that FileWidget.php gets the length from the configuration

'#maxlength' =&gt; $config-&gt;get('description.length')

whereas it is hardcoded in LinkWidget.php:

'#maxlength' =&gt; 255
If you go for module then you can check Maxlength module.


  Maxlength allows you to set maximum length of any field on any form
  making use of the form API. This includes fields created using the UI.
  (Example: any text field on a node)