예제 #1
0
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'stOldPassword', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8'))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stPassword', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'regex', 'options' => array('pattern' => '/^.*(?=.{6,25})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$/', 'messages' => array('regexInvalid' => Translator::i18n('Senha inválida, ela deve ter de 6 a 25 caractéres, contendo números (0-9), letras maiúsculas (A-Z) e minúsculas (a-z)!'))))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stConfirmation', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'Identical', 'options' => array('token' => 'stPassword', 'messages' => array('notSame' => Translator::i18n('A confirmação não confere com a senha!'))))))));
     return $loInputFilter;
 }
예제 #2
0
 /**
  *
  */
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'User_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     return $loInputFilter;
 }
예제 #3
0
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stZipCode', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 15))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stRangeIni', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 6))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stRangeEnd', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 6))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'City_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'CityName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Country_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'CountryName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Estate_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'EstateName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     return $loInputFilter;
 }
예제 #4
0
파일: StreetForm.php 프로젝트: m3uzz/module
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'User_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'City_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'CityName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stType', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stStreet', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 250))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stNeighborhood', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stLatitude', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stLongitude', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stZoomMap', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     return $loInputFilter;
 }
예제 #5
0
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stCountry', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stAbreviationISO3', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim'), array('name' => 'StringToUpper')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 3, 'max' => 3))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stAbreviationISO2', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim'), array('name' => 'StringToUpper')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 2, 'max' => 2))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stTLD', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim'), array('name' => 'StringToUpper')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 3, 'max' => 4))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stLocale', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 2, 'max' => 5))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stCurency', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 3))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stCurrencyLabel', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stCurrencyAbreviation', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 3, 'max' => 3))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stCallingCode', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 5))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stDateFormate', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 10, 'max' => 10))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stTimeZone', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 4, 'max' => 6))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stSummerTimeZone', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 4, 'max' => 6))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stDateFormate', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 10, 'max' => 10))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'City_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'CityName', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     return $loInputFilter;
 }
예제 #6
0
파일: CityForm.php 프로젝트: m3uzz/module
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Estate_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'EstateName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stCity', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stAbreviation', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim'), array('name' => 'StringToUpper')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 2, 'max' => 4))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stZipCode', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 4, 'max' => 15))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stLatitude', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 20))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stLongitude', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 20))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stGeoLocalization', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 60))))));
     return $loInputFilter;
 }
예제 #7
0
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'stEmail', 'required' => true, 'validators' => array(array('name' => 'EmailAddress', 'options' => array('messages' => array('emailAddressInvalidHostname' => Translator::i18n('Hostname inválido!'), 'hostnameInvalidHostname' => Translator::i18n('Hostname inválido!'), 'hostnameLocalNameNotAllowed' => Translator::i18n('Hostname inválido!')))), array('name' => 'DoctrineModule\\Validator\\ObjectExists', 'options' => array('object_repository' => $this->getObjectManager()->getRepository($this->_sEntity), 'fields' => 'stEmail', 'messages' => array('noObjectFound' => Translator::i18n('E-mail não registrado!'))))))));
     return $loInputFilter;
 }
예제 #8
0
파일: AccessForm.php 프로젝트: m3uzz/module
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'stUsername', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => Translator::i18n('Login deve conter de 5 a 100 caracteres válidos!')))), array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 5, 'max' => 100, 'messages' => array('stringLengthTooShort' => Translator::i18n('Login muito curto, mínimo 5 caractéres!'), 'stringLengthTooLong' => Translator::i18n('Login muito longo, máximo 100 caractéres!'))))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stPassword', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => Translator::i18n('Senha inválida, ela deve ter de 6 a 25 caractéres, contendo números (0-9), letras maiúsculas (A-Z) e minúsculas (a-z)!')))), array('name' => 'regex', 'options' => array('pattern' => '/^.*(?=.{6,25})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$/', 'messages' => array('regexInvalid' => Translator::i18n('Senha inválida, ela deve ter de 6 a 25 caractéres, contendo números (0-9), letras maiúsculas (A-Z) e minúsculas (a-z)!'), 'regexNotMatch' => Translator::i18n('Senha inválida, ela deve ter de 6 a 25 caractéres, contendo números (0-9), letras maiúsculas (A-Z) e minúsculas (a-z)!'))))))));
     return $loInputFilter;
 }
예제 #9
0
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'User_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Category_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'User_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stResource', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 2, 'max' => 150))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stValue', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 3, 'max' => 150))))));
     return $loInputFilter;
 }
예제 #10
0
파일: EstateForm.php 프로젝트: m3uzz/module
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Country_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'CountryName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stEstate', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stAbreviation', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim'), array('name' => 'StringToUpper')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 2, 'max' => 2))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stTimeZone', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 4, 'max' => 6))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stSummerTimeZone', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 4, 'max' => 6))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'City_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'CityName', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     return $loInputFilter;
 }
예제 #11
0
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'User_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'UserGroup_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'UserGroupName', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => Translator::i18n('O grupo de usuário deve ser informado!'))))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim'), array('name' => 'StringToLower')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 4, 'max' => 35))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stLabel', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 4, 'max' => 35))))));
     return $this->_oInputFilter = $loInputFilter;
 }
예제 #12
0
파일: UserForm.php 프로젝트: m3uzz/module
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $lbRequired = true;
     if ($this->_sActionType == 'edit') {
         $lbRequired = false;
     }
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'User_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'UserGroup_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'UserGroupName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => Translator::i18n('O grupo de usuário deve ser informado!'))))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stEmail', 'required' => true, 'validators' => array(array('name' => 'EmailAddress', 'options' => array('useMxCheck' => true, 'messages' => array('emailAddressInvalidFormat' => Translator::i18n('Formato de email inválido!'))))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stUsername', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => Translator::i18n('Login deve conter de 5 a 100 caracteres válidos!')))), array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 5, 'max' => 100, 'messages' => array('stringLengthTooShort' => Translator::i18n('Login muito curto, mínimo 5 caractéres!'), 'stringLengthTooLong' => Translator::i18n('Login muito longo, máximo 100 caractéres!'))))))));
     if ($this->_sActionType == 'edit') {
         $loInputFilter->add($loFactory->createInput(array('name' => 'stOldPassword', 'required' => $lbRequired, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8'))))));
     }
     $loInputFilter->add($loFactory->createInput(array('name' => 'stPassword', 'required' => $lbRequired, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'regex', 'options' => array('pattern' => '/^.*(?=.{6,25})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$/', 'messages' => array('regexInvalid' => Translator::i18n('Senha inválida, ela deve ter de 6 a 25 caractéres, contendo números (0-9), letras maiúsculas (A-Z) e minúsculas (a-z)!'))))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stConfirmation', 'required' => $lbRequired, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'Identical', 'options' => array('token' => 'stPassword', 'messages' => array('notSame' => Translator::i18n('A confirmação não confere com a senha!'))))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Person_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'PersonName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => Translator::i18n('O usuário deve ser ligado a uma pessoa!'))))))));
     return $loInputFilter;
 }
예제 #13
0
파일: PersonForm.php 프로젝트: m3uzz/module
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'User_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 15, 'max' => 250))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'enumGender', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'InArray', 'options' => array('encoding' => 'UTF-8', 'haystack' => array('M', 'F'), 'messages' => array('notInArray' => Translator::i18n('O genero deve ser M ou F'))))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'dtBirthdate', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array())));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stCitizenId', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'max' => 20))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stDoc2', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'max' => 20))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stPassport', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'max' => 15))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stNationality', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'max' => 50))))));
     return $loInputFilter;
 }
예제 #14
0
 public function getInputFilter()
 {
     $loInputFilter = new InputFilter();
     $loInputFilter->setForm($this);
     $loFactory = new InputFactory();
     $loInputFilter->add($loFactory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'User_id', 'required' => false, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Country_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'CountryName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Estate_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'EstateName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'City_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'CityName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'Street_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'StreetName', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'ZipCode_id', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'ZipCodeNum', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stPlace', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stNumber', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stComplement', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stGeoLocalization', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'stZoomMap', 'required' => false, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 1, 'max' => 50))))));
     $loInputFilter->add($loFactory->createInput(array('name' => 'enumMasterAddr', 'required' => true, 'filters' => array(array('name' => 'Int')))));
     return $loInputFilter;
 }