Skip to content

fix: Standardize character validation messages - #3

Open
shrwnsan wants to merge 1 commit into
mantramatt:mainfrom
shrwnsan:fix/character-validation-messages
Open

fix: Standardize character validation messages#3
shrwnsan wants to merge 1 commit into
mantramatt:mainfrom
shrwnsan:fix/character-validation-messages

Conversation

@shrwnsan

@shrwnsan shrwnsan commented Jun 6, 2025

Copy link
Copy Markdown

📋 Pull Request Description

🎯 What does this PR do?

I've updated the UI help text and the JavaScript error message to be consistent and accurate regarding valid input characters.

The valid characters for the target pattern are now clearly stated as "0-9, a-z (excluding b, i, o)" in both index.html and main.js. The error message wording has also been improved for clarity.

🔗 Related Issues

Fixes #(issue number)

🧪 Testing

  • I have tested this change locally
  • I have tested in multiple browsers
  • I have verified security implications
  • I have updated documentation if needed

📝 Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Security improvement

🔒 Security Checklist

  • No private keys are logged or transmitted
  • Cryptographic changes maintain BIP32/BIP44 compatibility
  • No new external dependencies that could compromise security
  • Randomness sources remain cryptographically secure

📸 Screenshots (if applicable)

Add screenshots of UI changes here.

🚀 Performance Impact

  • No performance impact
  • Slight performance improvement
  • Slight performance degradation (justified)
  • Significant performance change (please explain)

📱 Browser Testing

  • Chrome
  • Firefox
  • Safari
  • Edge

📝 Additional Notes

Any additional information or context about this PR.

I've updated the UI help text and the JavaScript error message to be consistent and accurate regarding valid input characters.

The valid characters for the target pattern are now clearly stated as "0-9, a-z (excluding b, i, o)" in both `index.html` and `main.js`. The error message wording has also been improved for clarity.
@shrwnsan shrwnsan changed the title Fix: Standardize character validation messages fix: Standardize character validation messages Jun 6, 2025
@mantramatt
mantramatt requested a review from Copilot August 6, 2025 10:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR standardizes character validation messages across the codebase to ensure consistency between the UI help text and JavaScript error messages. The changes clarify which characters are valid for input patterns.

  • Updated error message in main.js to use consistent language and character specification
  • Updated help text in index.html to match the simplified character description
  • Improved clarity by using "excluding" instead of "except" for consistency

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
main.js Updated error message to standardize character validation feedback
index.html Updated help text to match the simplified character specification

Comment thread main.js

if (!validate_target_string(target)) {
feedback.textContent = 'Invalid characters - use only: 0-9, a-z (except "b", "i", "o", "1")';
feedback.textContent = 'Please use valid characters - only: 0-9, a-z (excluding b, i, o)'; // THIS LINE NEEDS TO CHANGE

Copilot AI Aug 6, 2025

Copy link

Choose a reason for hiding this comment

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

The comment '// THIS LINE NEEDS TO CHANGE' should be removed as it appears to be a development note that wasn't meant to be committed.

Suggested change
feedback.textContent = 'Please use valid characters - only: 0-9, a-z (excluding b, i, o)'; // THIS LINE NEEDS TO CHANGE
feedback.textContent = 'Please use valid characters - only: 0-9, a-z (excluding b, i, o)';

Copilot uses AI. Check for mistakes.
Comment thread main.js

if (!validate_target_string(target)) {
feedback.textContent = 'Invalid characters - use only: 0-9, a-z (except "b", "i", "o", "1")';
feedback.textContent = 'Please use valid characters - only: 0-9, a-z (excluding b, i, o)'; // THIS LINE NEEDS TO CHANGE

Copilot AI Aug 6, 2025

Copy link

Choose a reason for hiding this comment

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

The error message excludes 'b, i, o' but the original message also excluded '1'. If '1' is also an invalid character, it should be included in the exclusion list for accuracy.

Suggested change
feedback.textContent = 'Please use valid characters - only: 0-9, a-z (excluding b, i, o)'; // THIS LINE NEEDS TO CHANGE
feedback.textContent = 'Please use valid characters - only: 0-9, a-z (excluding 1, b, i, o)'; // THIS LINE NEEDS TO CHANGE

Copilot uses AI. Check for mistakes.
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.

2 participants