<commit_before><?php

namespace Application\Validator;

use Zend\InputFilter\InputFilter;
use Zend\InputFilter\Factory as InputFactory;

class UserValidator extends InputFilter
{

    public function __construct()
    {
        $factory = new InputFactory();
        $this->add(
            $factory->createInput(
                [
                    'name' => 'id',
                    'required' => false,
                    'filters' =>
                        [
                            [
                                'name' => 'Int'
                            ]
                        ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'name',
                    'required' => true,
                    'filters' => [
                        ['name' => 'StripTags'],
                        ['name' => 'StringTrim']
                    ],
                    'validators' => [
                        [
                            'name' => 'StringLength',
                            'options' => [
                                'encoding' => 'UTF-8',
                                'min' => 3,
                                'max' => 60
                            ]
                        ]
                    ],
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'password',
                    'required' => false,
                    'validators' => [
                        [
                            'name' => 'StringLength',
                            'options' => [
                                'encoding' => 'UTF-8',
                                'min' => 6,
                                'max' => 60
                            ]
                        ]
                    ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'email',
                    'required' => true,
                    'valildators' => [
                        'name' => 'EmailAddress'
                    ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                  'name' => 'birthDate',
                  'required' => false,
                  'validators' => [
                      [
                         'name' => 'Date',
                          'options' => [
                              'format' => 'd/m/Y'
                          ]
                      ]

                  ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'typeAuth',
                    'required' => true,
                    'validators' => [
                        [
                            'name' => 'InArray',
                            'options' => [
                                'haystack' => ['FACEBOOK', 'GMAIL', 'LOCAL']
                            ]
                        ]
                    ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'university',
                    'required' => false,
                    'filters' => [
                        ['name' => 'StripTags'],
                        ['name' => 'StringTrim']
                    ],
                    'validators' => [
                        [
                            'name' => 'StringLength',
                            'options' => [
                                'encoding' => 'UTF-8',
                                'min' => 3,
                                'max' => 60
                            ]<commit_msg>Foi retirado o Validator do atributo birthDate<commit_after><?php

namespace Application\Validator;

use Zend\InputFilter\InputFilter;
use Zend\InputFilter\Factory as InputFactory;

class UserValidator extends InputFilter
{

    public function __construct()
    {
        $factory = new InputFactory();
        $this->add(
            $factory->createInput(
                [
                    'name' => 'id',
                    'required' => false,
                    'filters' =>
                        [
                            [
                                'name' => 'Int'
                            ]
                        ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'name',
                    'required' => true,
                    'filters' => [
                        ['name' => 'StripTags'],
                        ['name' => 'StringTrim']
                    ],
                    'validators' => [
                        [
                            'name' => 'StringLength',
                            'options' => [
                                'encoding' => 'UTF-8',
                                'min' => 3,
                                'max' => 60
                            ]
                        ]
                    ],
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'password',
                    'required' => false,
                    'validators' => [
                        [
                            'name' => 'StringLength',
                            'options' => [
                                'encoding' => 'UTF-8',
                                'min' => 6,
                                'max' => 60
                            ]
                        ]
                    ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'email',
                    'required' => true,
                    'valildators' => [
                        'name' => 'EmailAddress'
                    ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'typeAuth',
                    'required' => true,
                    'validators' => [
                        [
                            'name' => 'InArray',
                            'options' => [
                                'haystack' => ['FACEBOOK', 'GMAIL', 'LOCAL']
                            ]
                        ]
                    ]
                ]
            )
        );
        $this->add(
            $factory->createInput(
                [
                    'name' => 'university',
                    'required' => false,
                    'filters' => [
                        ['name' => 'StripTags'],
                        ['name' => 'StringTrim']
                    ],
                    'validators' => [
                        [
                            'name' => 'StringLength',
                            'options' => [
                                'encoding' => 'UTF-8',
                                'min' => 3,
                                'max' => 60
                            ]
{'fraction_non_alphanumeric': 0.11331521739130435, 'fraction_numerical': 0.003260869565217391, 'mean_word_length': 0.5262284884926395, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 123, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '820276', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1513, 'n_words': 236}