symphony/lib/toolkit/fields/field.date.php 1 location
|
@@ 506-511 (lines=6) @@
|
| 503 |
|
$message = null; |
| 504 |
|
|
| 505 |
|
// If this field is required |
| 506 |
|
if ($this->get('required') === 'yes' && strlen(trim($data)) == 0) { |
| 507 |
|
$message = __('‘%s’ is a required field.', array($this->get('label'))); |
| 508 |
|
return self::__MISSING_FIELDS__; |
| 509 |
|
} elseif (empty($data)) { |
| 510 |
|
return self::__OK__; |
| 511 |
|
} |
| 512 |
|
|
| 513 |
|
// Handle invalid dates |
| 514 |
|
if (!DateTimeObj::validate($data)) { |
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.taglist.php 1 location
|
@@ 394-397 (lines=4) @@
|
| 391 |
|
{ |
| 392 |
|
$message = null; |
| 393 |
|
|
| 394 |
|
if ($this->get('required') === 'yes' && strlen(trim($data)) == 0) { |
| 395 |
|
$message = __('‘%s’ is a required field.', array($this->get('label'))); |
| 396 |
|
return self::__MISSING_FIELDS__; |
| 397 |
|
} |
| 398 |
|
|
| 399 |
|
if ($this->get('validator')) { |
| 400 |
|
$data = preg_split('/\,\s*/i', $data, -1, PREG_SPLIT_NO_EMPTY); |
symphony/lib/toolkit/fields/field.textarea.php 1 location
|
@@ 184-187 (lines=4) @@
|
| 181 |
|
{ |
| 182 |
|
$message = null; |
| 183 |
|
|
| 184 |
|
if ($this->get('required') === 'yes' && strlen(trim($data)) == 0) { |
| 185 |
|
$message = __('‘%s’ is a required field.', array($this->get('label'))); |
| 186 |
|
return self::__MISSING_FIELDS__; |
| 187 |
|
} |
| 188 |
|
|
| 189 |
|
if ($this->__applyFormatting($data, true, $errors) === false) { |
| 190 |
|
$message = __('‘%s’ contains invalid XML.', array($this->get('label'))) . ' ' . __('The following error was returned:') . ' <code>' . $errors[0]['message'] . '</code>'; |