Rev 16784 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
<?php
declare(strict_types=1);
namespace LeadersLinked\Form\JobDescription;
use Laminas\InputFilter\InputFilter;
use LeadersLinked\Mapper\IndustryMapper;
use LeadersLinked\Mapper\CompanySizeMapper;
use LeadersLinked\Mapper\JobCategoryMapper;
use LeadersLinked\Mapper\JobDescriptionMapper;
class JobDescriptionFilter extends InputFilter
{
public function __construct()
{
$this->add([
'name' => 'name',
'required' => true,
'filters' => [
['name' => \Laminas\Filter\StripTags::class],
['name' => \Laminas\Filter\StringTrim::class],
['name' => \Laminas\Filter\UpperCaseWords::class],
],
'validators' => [
[
'name' => \Laminas\Validator\StringLength::class,
'options' => [
'encoding' => 'UTF-8',
'max' => 128,
],
],
[
'name' => \Laminas\Validator\NotEmpty::class,
],
],
]);
$this->add([
'name' => 'functions',
'required' => true,
'filters' => [
['name' => \Laminas\Filter\StripTags::class],
['name' => \Laminas\Filter\StringTrim::class],
],
'validators' => [
[
'name' => \Laminas\Validator\NotEmpty::class,
],
[
'name' => \Laminas\Validator\StringLength::class,
'options' => [
'encoding' => 'UTF-8',
'max' => 1024,
],
],
],
]);
$this->add([
'name' => 'objectives',
'required' => true,
'filters' => [
['name' => \Laminas\Filter\StripTags::class],
['name' => \Laminas\Filter\StringTrim::class],
],
'validators' => [
[
'name' => \Laminas\Validator\NotEmpty::class,
],
[
'name' => \Laminas\Validator\StringLength::class,
'options' => [
'encoding' => 'UTF-8',
'max' => 1024,
],
],
],
]);
$this->add([
'name' => 'status',
'required' => false,
'filters' => [
['name' => \Laminas\Filter\StripTags::class],
['name' => \Laminas\Filter\StringTrim::class],
],
'validators' =>[
[
'name' =>\Laminas\Validator\NotEmpty::class,
],
]
]);
$this->add([
'name' => 'job_description_id_boss',
'required' => false,
'filters' => [
['name' => \Laminas\Filter\StripTags::class],
['name' => \Laminas\Filter\StringTrim::class],
],
'validators' =>[
[
'name' =>\Laminas\Validator\NotEmpty::class,
],
]
]);
$this->add([
'name' => 'competencies_selected',
'required' => false,
]);
}
}