From 0678eb491f5d87e98112b1ba8af7a149778fb857 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Tue, 26 Jun 2018 10:46:02 -0700 Subject: [PATCH] New validation-themed reserved field handles Resolves #3032 --- CHANGELOG-v3.md | 1 + src/base/Field.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG-v3.md b/CHANGELOG-v3.md index d984ef712a4..1a661122e12 100644 --- a/CHANGELOG-v3.md +++ b/CHANGELOG-v3.md @@ -18,6 +18,7 @@ - The PHP Info utility no longer displays the original values for settings and only the current environment value. ([#2990](https://github.com/craftcms/cms/issues/2990)) - Loosened up most of Craft’s Composer dependency constraints. - Craft no longer publishes asset thumbnails to the `cpresources/` folder. +- `attributes`, `error`, `errors`, and `scenario` are now reserved field handles. ([#3032](https://github.com/craftcms/cms/issues/3032)) - `craft\web\UrlManager::createUrl()`, `createAbsoluteUrl()`, and `getMatchedElement()` now log warnings if they’re called before Craft has been fully initialized. ([#3028](https://github.com/craftcms/cms/issues/3028)) ### Deprecated diff --git a/src/base/Field.php b/src/base/Field.php index b7b570e97db..9ba0575fbb9 100644 --- a/src/base/Field.php +++ b/src/base/Field.php @@ -172,12 +172,15 @@ public function rules() 'reservedWords' => [ 'archived', 'attributeLabel', + 'attributes', 'children', 'contentTable', 'dateCreated', 'dateUpdated', 'enabled', 'enabledForSite', + 'error', + 'errors', 'fieldValue', 'id', 'level', @@ -193,6 +196,7 @@ public function rules() 'ref', 'rgt', 'root', + 'scenario', 'searchScore', 'siblings', 'site',