mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Rule::requiredIf(!$this->libraryItem->id)
This commit is contained in:
@@ -21,7 +21,7 @@ class NewsArticleForm extends Component
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'image' => ['mimes:jpeg,png,jpg,gif', 'max:10240', Rule::requiredIf(!$this->libraryItem->id)],
|
||||
'image' => [Rule::requiredIf(!$this->libraryItem->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'],
|
||||
|
||||
'libraryItem.lecturer_id' => 'required',
|
||||
'libraryItem.name' => 'required',
|
||||
|
||||
Reference in New Issue
Block a user