Laravel form inputs - how to set maxlength

Tomas Turan picture Tomas Turan · Dec 17, 2014 · Viewed 21.1k times · Source

Maximal length of HTML inputs can be set by: <input type="text" name="" maxlength="10"> Is there a way how to set maxlength of form input when creating inputs in Laravel way?

{{ Form::text('name', null, array('placeholder' => '')) }}

Answer

Joe picture Joe · Dec 17, 2014
{{ Form::text('name', null, array('placeholder' => '','maxlength' => 10 )) }}

Works with the Chrome Version 39.0.2171.95 (64-bit)