Add client-side NID validation with automatic lowercase conversion and specific error messages#305
Add client-side NID validation with automatic lowercase conversion and specific error messages#305Copilot wants to merge 5 commits into
Conversation
Co-authored-by: jontyms <64489881+jontyms@users.noreply.github.com>
Co-authored-by: jontyms <64489881+jontyms@users.noreply.github.com>
jontyms
left a comment
There was a problem hiding this comment.
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 <64489881+jontyms@users.noreply.github.com>
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 <64489881+jontyms@users.noreply.github.com>
✅ 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:
replaceAllused 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.