Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/utility/validator.php
| Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | |||||
| $item_info = Array ( | $item_info = Array ( | ||||
| $this->dataSource->IDField . ': <strong>' . $this->dataSource->GetID() . '</strong>', | $this->dataSource->IDField . ': <strong>' . $this->dataSource->GetID() . '</strong>', | ||||
| ); | ); | ||||
| if ( $title_info && reset($title_info) ) { | if ( $title_info && reset($title_info) ) { | ||||
| $item_info[] = key($title_info) . ': <strong>' . current($title_info) . '</strong>'; | $item_info[] = key($title_info) . ': <strong>' . current($title_info) . '</strong>'; | ||||
| } | } | ||||
| $error_msg = ' Validation failed in prefix - <strong>' . $this->dataSource->Prefix . '</strong> (' . implode('; ', $item_info) . '), | $item_info[] = 'Temp Mode: <strong>' . ($this->dataSource->IsTempTable() ? 'Yes' : 'No') . '</strong>'; | ||||
| FieldErrors follow (look at items with <strong>"pseudo"</strong> key set)<br /> | |||||
| You may ignore this notice if submitted data really has a validation error'; | $raw_errors = array_filter($this->FieldErrors, function ($error_params) { | ||||
| trigger_error(trim($error_msg), E_USER_NOTICE); | return isset($error_params['pseudo']); | ||||
| }); | |||||
| $error_msg = <<<HTML | |||||
| Validation failed for <strong>%s</strong> item (%s).<br/> | |||||
| <strong>Validation errors:</strong><br/> | |||||
| <pre>%s</pre> | |||||
| You may ignore this notice if submitted data really has a validation error. | |||||
| HTML; | |||||
| $error_msg = sprintf( | |||||
| $error_msg, | |||||
| $this->dataSource->getPrefixSpecial(), | |||||
| implode('; ', $item_info), | |||||
| print_r($raw_errors, true) | |||||
| ); | |||||
| $this->Application->Debugger->dumpVars($this->FieldErrors); | trigger_error(trim($error_msg), E_USER_NOTICE); | ||||
| } | } | ||||
| return $global_res; | return $global_res; | ||||
| } | } | ||||
| /** | /** | ||||
| * Validates given field | * Validates given field | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 398 Lines • Show Last 20 Lines | |||||