Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15546 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
15546 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\DiscoveryContact;
6
 
7
 
8
use Laminas\InputFilter\InputFilter;
9
 
10
class ContactUploadFilter extends InputFilter
11
{
12
 
13
 
14
    public function __construct()
15
    {
16
 
17
        $this->add([
18
            'name' => 'file',
19
            'required' => false,
20
            'filters' => [
21
                ['name' => \Laminas\Filter\BaseName::class],
22
            ],
23
            'validators' => [
24
                [
25
                    'name' => \Laminas\Validator\NotEmpty::class,
26
                ],
27
                [
28
                    'name' => \Laminas\Validator\File\Extension::class,
29
                    'options' => [
30
                        'extension' => ['xlsx', 'xls']
31
                    ]
32
                ],
16766 efrain 33
                /*
15546 efrain 34
                [
35
                    'name' => \Laminas\Validator\File\MimeType::class,
36
                    'options' => [
37
                        'mimeType' => ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel'],
38
                        'enableHeaderCheck' => true,
39
                    ]
16766 efrain 40
                ],*/
15546 efrain 41
            ],
42
        ]);
43
 
44
 
45
 
46
 
47
    }
48
}