function FieldValidationException::__construct
FieldValidationException::__construct($errors)
Constructor for FieldValidationException.
Parameters
$errors: An array of field validation errors, keyed by field name and delta that contains two keys:
- 'error': A machine-readable error code string, prefixed by the field module name. A field widget may use this code to decide how to report the error.
- 'message': A human-readable error message such as to be passed to form_error() for the appropriate form element.
File
- modules/field/field.attach.inc, line 26
- Field attach API, allowing entities (nodes, users, ...) to be 'fieldable'.
Class
- FieldValidationException
- Exception thrown by field_attach_validate() on field validation errors.
Code
function __construct($errors) { $this->errors = $errors; parent::__construct(t('Field validation errors')); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.attach.inc/function/FieldValidationException::__construct/7.x