null, 'errorMessage' => null, 'errorMessages' => null, 'field' => null, 'hasErrors' => true, 'hasInlineLabel' => null, 'hasNestedRecursiveValidationRules' => null, 'id' => null, 'inlineLabelVerticalAlignment' => VerticalAlignment::Start, 'isDisabled' => null, 'label' => null, 'labelPrefix' => null, 'labelSrOnly' => null, 'labelSuffix' => null, 'labelTag' => 'label', 'required' => null, 'shouldShowAllValidationMessages' => null, 'statePath' => null, ])); foreach ($attributes->all() as $__key => $__value) { if (in_array($__key, $__propNames)) { $$__key = $$__key ?? $__value; } else { $__newAttributes[$__key] = $__value; } } $attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes); unset($__propNames); unset($__newAttributes); foreach (array_filter(([ 'areHtmlErrorMessagesAllowed' => null, 'errorMessage' => null, 'errorMessages' => null, 'field' => null, 'hasErrors' => true, 'hasInlineLabel' => null, 'hasNestedRecursiveValidationRules' => null, 'id' => null, 'inlineLabelVerticalAlignment' => VerticalAlignment::Start, 'isDisabled' => null, 'label' => null, 'labelPrefix' => null, 'labelSrOnly' => null, 'labelSuffix' => null, 'labelTag' => 'label', 'required' => null, 'shouldShowAllValidationMessages' => null, 'statePath' => null, ]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) { $$__key = $$__key ?? $__value; } $__defined_vars = get_defined_vars(); foreach ($attributes->all() as $__key => $__value) { if (array_key_exists($__key, $__defined_vars)) unset($$__key); } unset($__defined_vars, $__key, $__value); ?> hasInlineLabel(); $hasNestedRecursiveValidationRules ??= $field instanceof \Filament\Forms\Components\Contracts\HasNestedRecursiveValidationRules; $id ??= $field->getId(); $isDisabled ??= $field->isDisabled(); $label ??= $field->getLabel(); $labelSrOnly ??= $field->isLabelHidden(); $required ??= $field->isMarkedAsRequired(); $statePath ??= $field->getStatePath(); $areHtmlErrorMessagesAllowed ??= $field->areHtmlValidationMessagesAllowed(); $shouldShowAllValidationMessages ??= $field->shouldShowAllValidationMessages(); } $aboveLabelSchema = $field?->getChildSchema($field::ABOVE_LABEL_SCHEMA_KEY)?->toHtmlString(); $belowLabelSchema = $field?->getChildSchema($field::BELOW_LABEL_SCHEMA_KEY)?->toHtmlString(); $beforeLabelSchema = $field?->getChildSchema($field::BEFORE_LABEL_SCHEMA_KEY)?->toHtmlString(); $afterLabelSchema = $field?->getChildSchema($field::AFTER_LABEL_SCHEMA_KEY)?->toHtmlString(); $aboveContentSchema = $field?->getChildSchema($field::ABOVE_CONTENT_SCHEMA_KEY)?->toHtmlString(); $belowContentSchema = $field?->getChildSchema($field::BELOW_CONTENT_SCHEMA_KEY)?->toHtmlString(); $beforeContentSchema = $field?->getChildSchema($field::BEFORE_CONTENT_SCHEMA_KEY)?->toHtmlString(); $afterContentSchema = $field?->getChildSchema($field::AFTER_CONTENT_SCHEMA_KEY)?->toHtmlString(); $aboveErrorMessageSchema = $field?->getChildSchema($field::ABOVE_ERROR_MESSAGE_SCHEMA_KEY)?->toHtmlString(); $belowErrorMessageSchema = $field?->getChildSchema($field::BELOW_ERROR_MESSAGE_SCHEMA_KEY)?->toHtmlString(); $hasError = $hasErrors && (filled($errorMessage) || filled($errorMessages) || (filled($statePath) && ($errors->has($statePath) || ($hasNestedRecursiveValidationRules && $errors->has("{$statePath}.*"))))); if ($hasError && filled($statePath) && blank($errorMessage) && blank($errorMessages)) { if ($shouldShowAllValidationMessages) { $errorMessages = $errors->has($statePath) ? $errors->get($statePath) : ($hasNestedRecursiveValidationRules ? $errors->get("{$statePath}.*") : []); if (count($errorMessages) === 1) { $errorMessage = Arr::first($errorMessages); $errorMessages = []; } } else { $errorMessage = $errors->has($statePath) ? $errors->first($statePath) : ($hasNestedRecursiveValidationRules ? $errors->first("{$statePath}.*") : null); } } ?>