-
Notifications
You must be signed in to change notification settings - Fork 449
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
feat : add validations #1096
base: develop
Are you sure you want to change the base?
feat : add validations #1096
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1096 +/- ##
===========================================
+ Coverage 92.90% 93.00% +0.09%
===========================================
Files 38 38
Lines 2073 2102 +29
===========================================
+ Hits 1926 1955 +29
Misses 147 147
|
@@ -45,7 +44,7 @@ def test_second_user_cannot_be_admin(self): | |||
user = UserModel.query.filter_by(email="[email protected]").first() | |||
self.assertTrue(user is not None) | |||
self.assertTrue(user.id is not None) | |||
self.assertTrue(user.name == "User1") | |||
self.assertTrue(user.name == "UserA") |
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.
What's the reason for changing name from User1
to UserA
?
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.
User1 is not a valid name.
Refer
mentorship-backend/app/utils/validation_utils.py
Lines 4 to 7 in ee009cf
For the "name" field to be valid, it may contain one or more character from: | |
- letter "a" to "z" and/or "A" to "Z", | |
- any of the whitespace characters, and/or | |
- special character "-". |
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.
LGTM 👍
@epicadk can you please resolve conflicts here. I'm sorry I've missed this PR, and I am happy to review and approve :) |
Description
Fixes #1083
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
ran tests
Checklist:
Code/Quality Assurance Only