Skip to content

feat: change code length to 6 numbers #2894

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
merged 4 commits into from
Nov 18, 2022
Merged

feat: change code length to 6 numbers #2894

merged 4 commits into from
Nov 18, 2022

Conversation

jonas-jonas
Copy link
Member

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Merging #2894 (07fb725) into master (02a92b4) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 07fb725 differs from pull request most recent head 6926ed7. Consider uploading reports for the commit 6926ed7 to get more accurate results

@@            Coverage Diff             @@
##           master    #2894      +/-   ##
==========================================
- Coverage   76.11%   76.11%   -0.01%     
==========================================
  Files         308      308              
  Lines       18873    18870       -3     
==========================================
- Hits        14366    14363       -3     
  Misses       3389     3389              
  Partials     1118     1118              
Impacted Files Coverage Δ
selfservice/strategy/code/strategy.go 100.00% <100.00%> (ø)
selfservice/strategy/code/strategy_recovery.go 70.19% <100.00%> (ø)
session/handler.go 67.81% <0.00%> (-0.14%) ⬇️
driver/config/config.go 82.72% <0.00%> (-0.06%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -11,8 +11,7 @@
]
},
"code": {
"type": "string",
"pattern": "^\\d{8}$"
Copy link
Member Author

Choose a reason for hiding this comment

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

This was originally a suggestion by @zepatrik, but IMO proved impractical, as the error message from this is less than helpful ("does not match pattern ^\d{8}$") and in the end, we "validate" this field by checking if the code is correct, and if someone enters a code that is not 8 (after this PR 6) characters long, then that code is invalid anyway.

@jonas-jonas jonas-jonas self-assigned this Nov 17, 2022
@jonas-jonas jonas-jonas marked this pull request as ready for review November 18, 2022 08:34
@aeneasr aeneasr merged commit 56feb07 into master Nov 18, 2022
@aeneasr aeneasr deleted the fix/minorFixesCode branch November 18, 2022 08:49
peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this pull request Jun 30, 2023
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