mirror of
https://github.com/getgrav/grav.git
synced 2026-07-28 19:40:52 +02:00
Update Blueprint.php
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user