symphony/lib/toolkit/fields/field.input.php 1 location
|
@@ 159-162 (lines=4) @@
|
| 156 |
|
$data = $data['value']; |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
if ($this->get('required') === 'yes' && strlen(trim($data)) == 0) { |
| 160 |
|
$message = __('‘%s’ is a required field.', array($this->get('label'))); |
| 161 |
|
return self::__MISSING_FIELDS__; |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
if (!$this->__applyValidationRules($data)) { |
| 165 |
|
$message = __('‘%s’ contains invalid data. Please check the contents.', array($this->get('label'))); |
symphony/lib/toolkit/fields/field.date.php 1 location
|
@@ 516-521 (lines=6) @@
|
| 513 |
|
$message = null; |
| 514 |
|
|
| 515 |
|
// If this field is required |
| 516 |
|
if ($this->get('required') === 'yes' && strlen(trim($data)) == 0) { |
| 517 |
|
$message = __('‘%s’ is a required field.', array($this->get('label'))); |
| 518 |
|
return self::__MISSING_FIELDS__; |
| 519 |
|
} elseif (empty($data)) { |
| 520 |
|
return self::__OK__; |
| 521 |
|
} |
| 522 |
|
|
| 523 |
|
// Handle invalid dates |
| 524 |
|
if (!DateTimeObj::validate($data)) { |
symphony/lib/toolkit/fields/field.taglist.php 1 location
|
@@ 399-402 (lines=4) @@
|
| 396 |
|
{ |
| 397 |
|
$message = null; |
| 398 |
|
|
| 399 |
|
if ($this->get('required') === 'yes' && strlen(trim($data)) == 0) { |
| 400 |
|
$message = __('‘%s’ is a required field.', array($this->get('label'))); |
| 401 |
|
return self::__MISSING_FIELDS__; |
| 402 |
|
} |
| 403 |
|
|
| 404 |
|
if ($this->get('validator')) { |
| 405 |
|
$data = $this->parseUserSubmittedData($data); |
symphony/lib/toolkit/fields/field.textarea.php 1 location
|
@@ 189-192 (lines=4) @@
|
| 186 |
|
{ |
| 187 |
|
$message = null; |
| 188 |
|
|
| 189 |
|
if ($this->get('required') === 'yes' && strlen(trim($data)) == 0) { |
| 190 |
|
$message = __('‘%s’ is a required field.', array($this->get('label'))); |
| 191 |
|
return self::__MISSING_FIELDS__; |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
if ($this->__applyFormatting($data, true, $errors) === false) { |
| 195 |
|
$message = __('‘%s’ contains invalid XML.', array($this->get('label'))) . ' ' . __('The following error was returned:') . ' <code>' . $errors[0]['message'] . '</code>'; |