ferrero-naming-tool/public
DJP 167c85bde5 Add input validation and smart defaults for filename builder
Validation Improvements:
- Subject Title: Automatically converts underscores to hyphens
- Subject Title: Shows warning when underscores are detected
- Spot Version: Always enforces 3-character length
- Spot Version: Auto-pads with leading zeros (e.g., 1 → 001)
- Both frontend (JavaScript) and backend (PHP) validation

Smart Defaults:
- Spot Version: Defaults to "001"
- Duration: Defaults to "6" seconds
- Users can change defaults as needed

Applied to Both Versions:
- v1 (public/) - Original version updated
- v2 (public-v2/) - Tracking ID version updated

Technical Implementation:
- Real-time underscore detection and conversion
- Auto-hide warning after 3 seconds
- Input blur event for spot version padding
- Form submit validation as final check
- Server-side enforcement in API endpoints

Testing:
-  Underscores converted: "TEST_FILE" → "TEST-FILE"
-  Spot version validated: "1" rejected, "001" accepted
-  Defaults working: spot=001, duration=6

Improves data consistency and user experience.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 14:05:50 -04:00
..
css Initial commit: Ferrero Communication Assets Naming Convention Tool 2025-10-14 16:05:16 -04:00
js Add input validation and smart defaults for filename builder 2025-10-29 14:05:50 -04:00
api.php Add input validation and smart defaults for filename builder 2025-10-29 14:05:50 -04:00
index.php Add input validation and smart defaults for filename builder 2025-10-29 14:05:50 -04:00