Skip to content

Commit 87bae89

Browse files
committed
Fix validation when creating a new entry and not identifying required attributes, broken by 4a84c25
1 parent 1abc2cc commit 87bae89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Classes/LDAP/Schema/AttributeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ public function validation(array $array): ?array
557557
->unique();
558558

559559
$validation = collect(Arr::get(config('ldap.validation'),$this->name_lc,[]));
560-
if (($heirachy->intersect($this->required_by_object_classes)->count() > 0)
560+
if (($heirachy->intersect($this->required_by_object_classes->keys())->count() > 0)
561561
&& (! collect($validation->get($this->name_lc))->contains('required'))) {
562562
$validation->put($this->name_lc,array_merge(['required','min:1'],$validation->get($this->name_lc,[])))
563563
->put($this->name_lc.'.*',array_merge(['required','min:1'],$validation->get($this->name_lc.'.*',[])));

0 commit comments

Comments
 (0)