TYPO3 CMS  TYPO3_6-2
FloatValidator.php
Go to the documentation of this file.
1 <?php
3 
23 
31  public function isValid($value) {
32  if (is_float($value)) {
33  return;
34  }
35 
36  if (!is_string($value) || strpos($value, '.') === FALSE || preg_match('/^[0-9.e+-]+$/', $value) !== 1) {
37  $this->addError(
38  $this->translateErrorMessage(
39  'validator.float.notvalid',
40  'extbase'
41  ), 1221560288);
42  }
43  }
44 }
addError($message, $code, array $arguments=array(), $title='')
translateErrorMessage($translateKey, $extensionName, $arguments=array())