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' => '')) }}
{{ Form::text('name', null, array('placeholder' => '','maxlength' => 10 )) }}
Works with the Chrome Version 39.0.2171.95 (64-bit)
You can also check in validation as follow. For more details, you can take a look in validation
$validator = Validator::make(
array('name' => 'name'),
array('name' => 'required|max:5')
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With