Skip to content

Conversation

@jaygiang
Copy link
Collaborator

@jaygiang jaygiang commented Jun 9, 2025

Lesson 5: Form Validation - Documentation Updates

Key Changes

Added to Lesson 5: Form Validation

  • Comprehensive Validation Coverage: Added validation for Start Trip, Catch Log, and End Trip forms
  • Code Examples with Diff Highlighting: Used consistent //diff-add-start markers for all code snippets

Added Step 1: Understanding Form Validation Architecture

  • 1.1: Validation Architecture - Explains validation patterns used in RADFish applications
  • 1.2: Validation Types - Covers required fields, data types, ranges, and business logic validation

Added Step 2: Start Trip Form Validation

  • 2.1: Set Validation Error State - React state management for validation errors
  • 2.2: Required Field Validation Logic - Standardized validation helper functions
  • 2.3: Display Error Messages - USWDS ErrorMessage components with accessibility features

Added Step 3: Catch Log Form Validation

  • 3.1: New Catch Validation - Complex validation rules including number ranges and coordinates
  • 3.2: Recorded Catches Validation - Multi-record validation for existing catches list
  • 3.3: Error Display for Recorded Catches - Index-specific error handling and display

Added Step 4: End Trip Practice Exercise

  • Student-Driven Learning: Changed from showing complete implementation to guided practice
  • Clear Task Structure: Three specific implementation tasks with hints
  • Self-Assessment: Testing steps for students to verify their work

Updated Consistent Naming Conventions

  • Kebab-Case IDs: Updated all aria-describedby and <span id= references across lessons 2-5
  • Examples: tripDate-hinttrip-date-hint, tripDateErrorMessagetrip-date-error-message

@jaygiang jaygiang changed the base branch from main to lesson-4-cleanup June 9, 2025 20:22
@jaygiang jaygiang requested review from theangchen and thgaskell June 9, 2025 20:22
@jaygiang jaygiang linked an issue Jun 9, 2025 that may be closed by this pull request
Copy link
Collaborator

@theangchen theangchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM

Base automatically changed from lesson-4-cleanup to lesson-3-cleanup August 4, 2025 20:47
Base automatically changed from lesson-3-cleanup to learning-module August 4, 2025 20:49
@jaygiang jaygiang merged commit b47b978 into learning-module Aug 4, 2025
@jaygiang jaygiang deleted the lesson-5-cleanup branch August 4, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lesson 5 Cleanup

3 participants