- )}
@@ -1144,14 +1141,14 @@ This comprehensive example serves as a complete reference for implementing any f
7. **FormError Placement Options**
```typescript
- // Top of form (most common)
+ // Below inputs, above submit button (most common)
// Between sections
- // Bottom of form
-
+ // Top of form (for critical errors that need immediate attention)
+
// Multiple placements with different styling
@@ -1212,9 +1209,10 @@ This comprehensive example serves as a complete reference for implementing any f
- **Be user-friendly**: Avoid technical jargon and error codes
### 3. Placement Strategy
-- **Top placement**: For critical errors that should be seen immediately
+- **Below inputs, above submit button**: Most common placement - users see errors after completing form fields but before submitting
+- **Top placement**: For critical errors that need immediate attention before users start filling the form
- **Inline placement**: For contextual errors related to specific sections
-- **Bottom placement**: For summary or less critical errors
+- **Multiple placements**: FormError can be placed anywhere in the form and styled differently for various use cases
### 4. Component Integration
- FormError works seamlessly with all existing form components
From 77c81c23c5446700611ccdd3f19abe80db83b025 Mon Sep 17 00:00:00 2001
From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 15:48:38 +0000
Subject: [PATCH 2/2] Simplify FormError placement comments
Removed redundant comments about FormError placement and kept just one clear comment in the comprehensive example.
---
llms.txt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/llms.txt b/llms.txt
index 0f00908c..86c89532 100644
--- a/llms.txt
+++ b/llms.txt
@@ -22,7 +22,6 @@ The `FormError` component provides standardized form-level error handling, compl
import { FormError } from '@lambdacurry/forms';
// Basic usage - looks for errors._form by default
-// Typically placed below inputs and above submit button
// Custom error key
@@ -153,7 +152,6 @@ const LoginForm = () => {
disabled={isSubmitting}
/>
- {/* Form-level error display - typically placed below inputs and above submit button */}