TYPO3 CMS  TYPO3_6-2
ConjunctionValidator.php
Go to the documentation of this file.
1 <?php
3 
23 
32  public function validate($value) {
33  $validators = $this->getValidators();
34  if ($validators->count() > 0) {
35  $result = NULL;
36  foreach ($validators as $validator) {
37  if ($result === NULL) {
38  $result = $validator->validate($value);
39  } else {
40  $result->merge($validator->validate($value));
41  }
42  }
43  } else {
44  $result = new \TYPO3\CMS\Extbase\Error\Result;
45  }
46 
47  return $result;
48  }
49 
59  public function isValid($value) {
60  $result = TRUE;
61  foreach ($this->validators as $validator) {
62  if ($validator->isValid($value) === FALSE) {
63  $this->errors = array_merge($this->errors, $validator->getErrors());
64  $result = FALSE;
65  }
66  }
67  return $result;
68  }
69 }
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren&#39;t numeric.