From f3d0e1037895ac2b4cabc6ff134b2c651810209d Mon Sep 17 00:00:00 2001 From: Hugo Avila Date: Sun, 29 Nov 2015 21:43:05 -0800 Subject: [PATCH] Update Blueprint.php --- system/src/Grav/Common/Data/Blueprint.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Data/Blueprint.php b/system/src/Grav/Common/Data/Blueprint.php index 3e1dc1f09..8be6a8ea8 100644 --- a/system/src/Grav/Common/Data/Blueprint.php +++ b/system/src/Grav/Common/Data/Blueprint.php @@ -465,7 +465,9 @@ class Blueprint implements \ArrayAccess, ExportInterface && $field['validate']['required'] === true && empty($data[$name])) { $value = isset($field['label']) ? $field['label'] : $field['name']; - throw new \RuntimeException("Missing required field: {$value}"); + $language = self::getGrav()['language']; + $message = sprintf($language->translate('FORM.MISSING_REQUIRED_FIELD', null, true) . ' %s', $value); + throw new \RuntimeException($message); } } }