Making input file required

I intend to cause the field to be required but the traditional way is not working. Some help? I'm using the validity parsley

{!! Form::open(array('url' => 'backend/portfolio', 'id' => 'form', 'name' => 'InserirPortfolio', 'role' => 'form', 'files'=> true, 'class' => 'form-signin', 'data-validate' => 'parsley'))!!}

{!! Form::label('imagens', 'Imagem', ['class' => 'label_perfil']) !!}
{!! Form::file('imagens[]', array('multiple'=>true),[
    'class'         => 'input-file',
    'data-required' => 'true'
]) !!}

How i see in my html

<input multiple="1" name="imagens[]" type="file">

One example as i have

{!! Form::textarea('descricao', null, [
    'class'                         => 'form-control input-md', 
    'style'                         => 'height: 100px; resize: none;', 
    'placeholder'                   => 'Descrição',
    'data-required'                 => 'true',
    'data-required-message'         => 'O campo Descrição é obrigatório',                                           
    'pattern'                       => '^[0-9A-Za-zãÃáÁàÀêÊéÉèÈíÍìÌôÔõÕóÓòÒúÚùÙûÛçÇ. ]*$',
    'data-pattern-message'          => 'Está algo errado',
    'data-minlength'                => '10',
    'data-minlength-message'        => 'A descrição tem de ter 10 caracteres obrigatórios',
    'data-maxlength'                => '200',
    'data-maxlength-message'        => 'A descrição não pode conter mais de 200 caracteres',                                        

]) !!}

Answers


Have you tried something like this?

{!! Form::label('imagens', 'Imagem', ['class' => 'label_perfil']) !!}
{!! Form::file('imagens[]', array('multiple'=>true),[
    'class'         => 'input-file',
    'data-required' => 'true',
    'required' => 'required'
]) !!}

Need Your Help

Where are manifest resources stored in an ASP.NET app

asp.net

In the following code, where should my file "somefile.txt" be stored for the GetManifestResourceStream method to retrieve it:

Create a Linux packet splitter

linux sockets networking network-traffic high-traffic

I am looking for some hints to build a network packet splitter. What i want is some sort of tools/code that split the packets of a logic link (tcp/ip connection for ex.) over several network interf...