TYPO3 CMS  TYPO3_6-2
DigitValidator.php
Go to the documentation of this file.
1 <?php
3 
23 
27  protected $filter;
28 
34  const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_digit';
35 
42  public function isValid() {
43  if ($this->requestHandler->has($this->fieldName)) {
44  $value = $this->requestHandler->getByMethod($this->fieldName);
45  if ($this->filter === NULL) {
46  $className = 'TYPO3\\CMS\\Form\\Filter\\DigitFilter';
47  $this->filter = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className);
48  }
49  if ($this->filter->filter($value) !== $value) {
50  return FALSE;
51  }
52  }
53  return TRUE;
54  }
55 
56 }