AiPromptSubForm validates inline prompt against stale prompt type when multiple ai_prompt elements exist
<!--Please search existing work items before filing to avoid duplicates.--> ## Summary When a settings form contains multiple `#type => ai_prompt` elements with different prompt types, inline prompt creation can validate against the wrong prompt type. We reproduced this with four prompt selectors on the same config form: * `content_audit_preview_system`, no required variables * `content_audit_preview_user`, requires `{PAGE_CONTENT}` and `{VISITOR_QUESTION}` Note: Creating the same `content_audit_preview_system` prompt from the standalone Prompt Entities admin form works correctly, so the prompt type config itself is valid. Temporary logging inside `AiPromptSubform::validateForm()` showed: form type "content_audit_preview_system" internal helper type "content_audit_preview_user" parents "prompts \> preview_system_prompt \> add_prompt" So the inline subform being validated had the correct prompt type, but `AiPromptSubform::$aiPromptType` still referenced another prompt type from the same parent form. ## Steps to reproduce 1. Create a settings form with multiple `#type => ai_prompt` elements. 2. Configure at least two different prompt types: * one prompt type with required variables; * one prompt type with no required variables. 3. Use the inline “Create new prompt” form for the prompt type that has no required variables. 4. Fill in the required fields and submit the inline prompt form. ## Expected result The prompt is saved successfully without requiring variables from another prompt type. ## Actual result Validation may fail with an error from a different prompt type, for example: `The prompt text must contain "{PAGE_CONTENT}".` ## Environment - Drupal version: 11.3 - Module version: 1.3.0 - PHP version: 8.3 - Provider: OpenAI / Any - Last known working version: None / The bug/issue was introduced in #3509235 ### Frontend environment _(only required for UI / frontend issues)_ - OS: Any - Browser: Any ### Screenshots / recordings _(optional)_ <!--Attach a screenshot or screen recording. Drag and drop files directly into this text box.--> ### Error messages or logs _(optional)_ "The prompt text must contain {{ Variable }}" <!--If this issue description was significantly AI-generated (entire sections, not autocomplete), please note it in a comment below. See https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquette/policy-on-the-use-of-ai-when-contributing-to-drupal--> <!--If you discover this is a duplicate of an existing issue, use: /duplicate #<issue>--> <!--Component — uncomment the line(s) that apply (remove the surrounding comment markers):--> <!--/label ~"aiCoreModule"-->
issue