remove rule

This commit is contained in:
HolgerHatGarKeineNode
2023-10-04 21:24:14 +02:00
parent 69d26adf69
commit b12b579b76

View File

@@ -53,7 +53,7 @@ class LibraryItemForm extends Component
'libraryItem.type' => 'required', 'libraryItem.type' => 'required',
'libraryItem.language_code' => 'required', 'libraryItem.language_code' => 'required',
'libraryItem.value' => [ 'libraryItem.value' => [
'required', Rule::when($this->libraryItem->type !== LibraryItemType::DownloadableFile(), 'required'),
Rule::when( Rule::when(
$this->libraryItem->type !== LibraryItemType::MarkdownArticle() $this->libraryItem->type !== LibraryItemType::MarkdownArticle()
&& $this->libraryItem->type !== LibraryItemType::MarkdownArticleExtern(), ['url'] && $this->libraryItem->type !== LibraryItemType::MarkdownArticleExtern(), ['url']