-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add input validation #52
Add input validation #52
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
========================================
- Coverage 5.72% 5.58% -0.14%
========================================
Files 36 36
Lines 1921 1968 +47
Branches 41 41
========================================
Hits 110 110
- Misses 1778 1825 +47
Partials 33 33 ☔ View full report in Codecov by Sentry. |
Apply SLAP to addProjectScene and viewMainMenuScene
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
'Please enter a valid project name. A project name needs to be at least 3 characters long and cannot start with /.', | ||
); | ||
} | ||
const text = getTextFromTextMessages(ctx); |
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.
I like this refactor. I would do it the same way too.
* @param text - The text to check | ||
|
||
*/ | ||
export const validateProjectName = (text: string) => { |
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.
I believe the Project class already has this method
* Checks if a string is a valid project description. | ||
* @param text - The text to check | ||
*/ | ||
export const validateProjectDescription = (text: string) => { |
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 too
No description provided.