fix: Standardize character validation messages - #3
Open
shrwnsan wants to merge 1 commit into
Open
Conversation
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.
There was a problem hiding this comment.
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.jsto use consistent language and character specification - Updated help text in
index.htmlto 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 |
|
|
||
| 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 |
There was a problem hiding this comment.
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)'; |
|
|
||
| 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 |
There was a problem hiding this comment.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 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.htmlandmain.js. The error message wording has also been improved for clarity.🔗 Related Issues
Fixes #(issue number)
🧪 Testing
📝 Type of Change
🔒 Security Checklist
📸 Screenshots (if applicable)
Add screenshots of UI changes here.
🚀 Performance Impact
📱 Browser Testing
📝 Additional Notes
Any additional information or context about this PR.