Files
bi-agents/_bmad/wds/data/design-system/validation-patterns.md
Cassel 647cbec54f docs: update all documentation and add AI tooling configs
- Rewrite README.md with current architecture, features and stack
- Update docs/API.md with all current endpoints (corporate, BI, client 360)
- Update docs/ARCHITECTURE.md with cache, modular queries, services, ETL
- Update docs/GUIA-USUARIO.md for all roles (admin, corporate, agente)
- Add docs/INDEX.md documentation index
- Add PROJETO.md comprehensive project reference
- Add BI-CCC-Implementation-Guide.md
- Include AI agent configs (.claude, .agents, .gemini, _bmad)
- Add netbird VPN configuration
- Add status report

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:29:03 -04:00

75 lines
1.1 KiB
Markdown

# Form Validation Patterns
**Purpose:** Standard patterns for form validation and error handling.
**Referenced by:** Input Field, Form component-type instructions
---
## Validation Types
### Client-Side Validation
**Required Fields:**
```yaml
validation:
required: true
message: 'This field is required'
```
**Format Validation:**
```yaml
validation:
type: email
pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/
message: 'Please enter a valid email address'
```
**Length Validation:**
```yaml
validation:
minLength: 8
maxLength: 100
message: 'Password must be 8-100 characters'
```
---
## Error States
**Visual Indicators:**
- Red border
- Error icon
- Error message below field
- Error color for label
**Timing:**
- Show on blur (after user leaves field)
- Show on submit attempt
- Clear on valid input
---
## Success States
**Visual Indicators:**
- Green border (optional)
- Success icon (optional)
- Success message (optional)
**When to Show:**
- After successful validation
- For critical fields (password strength)
- For async validation (username availability)
---
**Reference this when specifying form components.**