You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2018. It is now read-only.
@@ -206,17 +206,17 @@ public function validate(array &$form, FormStateInterface $form_state) {
206
206
if ($trigger['#type'] == 'submit' && $trigger['#name'] == 'op') {
207
207
$upload_location = $this->getUploadLocation();
208
208
if (!file_prepare_directory($upload_location, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
209
-
$form_state->setError($form['widget']['upload'], t('Files could not be uploaded because the destination directory %destination is not configured correctly.', ['%destination' => $this->getConfiguration()['settings']['upload_location']]));
209
+
$form_state->setError($form['widget']['upload'], $this->t('Files could not be uploaded because the destination directory %destination is not configured correctly.', ['%destination' => $this->getConfiguration()['settings']['upload_location']]));
210
210
}
211
211
212
212
$files = $this->getFiles($form, $form_state);
213
213
if (in_array(FALSE, $files)) {
214
214
// @todo Output the actual errors from validateFile.
215
-
$form_state->setError($form['widget']['upload'], t('Some files that you are trying to upload did not pass validation. Requirements are: max file %size, allowed extensions are %extensions', ['%size' => $this->getConfiguration()['settings']['max_filesize'], '%extensions' => $this->getConfiguration()['settings']['extensions']]));
215
+
$form_state->setError($form['widget']['upload'], $this->t('Some files that you are trying to upload did not pass validation. Requirements are: max file %size, allowed extensions are %extensions', ['%size' => $this->getConfiguration()['settings']['max_filesize'], '%extensions' => $this->getConfiguration()['settings']['extensions']]));
216
216
}
217
217
218
218
if (empty($files)) {
219
-
$form_state->setError($form['widget']['upload'], t('At least one valid file should be uploaded.'));
219
+
$form_state->setError($form['widget']['upload'], $this->t('At least one valid file should be uploaded.'));
220
220
}
221
221
222
222
// If there weren't any errors set, run the normal validators.
0 commit comments