diff --git a/class.filestack.plugin.php b/class.filestack.plugin.php index 109453f..f142b62 100644 --- a/class.filestack.plugin.php +++ b/class.filestack.plugin.php @@ -162,6 +162,10 @@ public function settingsController_filestack_create($sender) { 'Garden.Upload.MaxFileSize' => ['Control' => 'TextBox', 'Default' => c('Garden.Upload.MaxFileSize', ini_get('upload_max_filesize')), 'Description' => 'Allowed Max File Size. Accepted Measurements: Megabyte - M, Gigabyte - G.'], ]); + if($cf->form()->authenticatedPostBack()) { + $cf->form()->validateRule('Plugins.Filestack.ApiKey', 'ValidateRequired', t('You must provide Filestack API Key.')); + } + $sender->setData('Title', sprintf(t('%s Settings'), 'Filestack')); $cf->renderAll(); }