We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a9651b commit f6020cfCopy full SHA for f6020cf
src/Html/Editor/Fields/Field.php
@@ -389,7 +389,7 @@ public function className(string $className): static
389
}
390
391
/**
392
- * Add an additional format to indicate if a field is required.
+ * Add a format to indicate if a field is required.
393
*
394
* @return $this
395
*/
@@ -398,6 +398,6 @@ public function required(bool $required = true): static
398
$requiredFieldHtml = $required ? '<span class="text-red-500">*</span>' : '';
399
$label = $this->get('label');
400
401
- return $this->label($label.' '.$requiredFieldHtml);
+ return $this->label(($label ?? '').' '.$requiredFieldHtml);
402
403
0 commit comments