-
Notifications
You must be signed in to change notification settings - Fork 200
fix: align frontend auth validation with backend #530
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
Merged
mehul-m-prajapati
merged 2 commits into
GitMetricsLab:main
from
Tanish-Solanki:fix-auth-validation-mismatch
May 29, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
🧩 Analysis chain
🌐 Web query:
Does JavaScript (ECMAScript regex) support possessive quantifiers like{8,}+? If not, what is the correct equivalent for enforcing length alongside.min(8)validation?💡 Result:
No. JavaScript regular expressions (ECMAScript) do not support possessive quantifier syntax like
{8,}+; attempting it results in a syntax error (e.g., “Nothing to Repeat”) because ECMAScript regex only recognizes greedy quantifiers ({8,}) and non-greedy ones ({8,}?), not possessive ones [1][2]. Correct equivalent (enforce minimum length / no.min(8)-style “backtracking control”): use a normal quantifier with a length anchor. - If you want “length at least 8” for the whole input:^.{8,}$(or with a specific character class, e.g.^[A-Za-z0-9]{8,}$). - If you only need to match a substring of length ≥ 8 inside a larger string:.{8,}. Note: possessive quantifiers are about preventing backtracking for performance/engine control, not about adding a “minimum length” constraint. For length validation in regex, use quantifiers{n,}(or{n,m}) and anchors like^and$as shown above [2][3].Citations:
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 115
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 1824
Fix invalid password regex quantifier (
{8,}+)backend/validators/authValidator.jscontains{8,}+insignupSchema.password’s regex; ECMAScript regex doesn’t support possessive quantifiers like this, so it’s a regex syntax error that can prevent the module from loading (breaking signup validation). Replace{8,}+with a valid quantifier such as{8,}(length is already enforced via.min(8)/.max(100)).🤖 Prompt for AI Agents