Skip to content

Conversation

@samuele-ruffino96
Copy link

Related Issues

Description

This PR enhances the PasswordDialog component in the design system to provide more detailed and user-friendly validation error messages, addressing the UX improvements requested in #189. The changes improve the user experience across all backup-related screens by showing specific validation feedback.

Changes Made

  • Enhanced length validation: Now shows formatted error messages with actual min/max values (e.g., "Password must be between 8 and 64 characters")
  • Added confirmation validation: Clear error message when password confirmation doesn't match
  • Custom validation support: Added optional validationHint parameter for custom validation error messages
  • String interpolation: Used existing string resources with proper formatting for dynamic values
  • Backward compatibility: All existing usage patterns continue to work without changes

Technical Details

  • Modified PasswordDialog.kt in core/designsystem module
  • Used existing string resources with String.format() for dynamic error messages
  • Maintained all existing parameters and default behaviors
  • Added validation state handling for better error display

Impact

This enhancement affects all screens that use PasswordDialog:

  • BackupExportScreen - Setting passwords for backup export
  • BackupScreen - Creating backup passwords
  • BackupImportScreen - Entering passwords for backup import
  • BackupSettingsScreen - Managing backup password settings

Users will now receive more specific feedback about password validation requirements, improving the overall user experience.

Samuele Domenico Ruffino added 5 commits July 3, 2025 14:14
…rror messages

- Add formatted length validation error with min/max values
- Add confirm password mismatch error message
- Add custom validation error with optional hint parameter
- Use string interpolation for dynamic error messages
- Maintain backward compatibility with existing usage patterns

All backup screens now show more specific validation feedback to users.
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.

1 participant