-
Notifications
You must be signed in to change notification settings - Fork 4
Add client-side NID validation with automatic lowercase conversion and specific error messages #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Co-authored-by: jontyms <[email protected]>
Co-authored-by: jontyms <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no better it doesn't tell the user what is wrong
@copilot Please clearly communicate to the user what is invalid about their format |
Co-authored-by: jontyms <[email protected]>
I've implemented specific error messages that clearly communicate what's wrong with the NID format. The new validation provides detailed feedback:
This replaces the previous generic "(invalid format!)" message with actionable guidance. See commit 1ec9fe8.
✅ Done! The validation now clearly communicates what's invalid about the format with specific error messages: Before: Generic "(invalid format!)" for all cases
Each error message tells users exactly what's wrong and how to fix it. Commit 1ec9fe8. |
Unable to check because ‘/([A-Za-z0-9.-_+]+)@[A-Za-z0-9-]+(.[A-Za-z-]{2,})/v’ is not a valid regexp: character class escape cannot be used in class range in regular expression 2 2 A resource is blocked by OpaqueResponseBlocking, please check browser console for details. d49990e1b52be0a5220a679e99761d5a.png |
Co-authored-by: jontyms <[email protected]>
✅ Fixed the JavaScript error! The issue was using Problem:
Solution:
The NID validation now works without JavaScript errors and provides specific error messages as intended. Commit 183bd71. |
Summary
The NID validation now provides specific, actionable error messages without JavaScript errors:
Fixed JavaScript Error:
replaceAll
used with regex without global flag caused runtime errorreplace()
with global flag for dynamic patternsThis addresses both the original feedback about unclear error messaging and the new JavaScript error reported in the comments.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.