Skip to content

Added solution to the task#140

Open
YevheniiKa wants to merge 3 commits intomate-academy:mainfrom
YevheniiKa:develop
Open

Added solution to the task#140
YevheniiKa wants to merge 3 commits intomate-academy:mainfrom
YevheniiKa:develop

Conversation

@YevheniiKa
Copy link

Added solution to the task

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

I am requesting changes for this submission. You've done a great job setting up the function and writing a wide range of tests, which is a fantastic start! However, the core validation logic has a few critical issues that don't align with the requirements.

Here are the main points to address:

  1. Password Validation: The regular expression in src/validateRegisterForm.js does not support Cyrillic letters (Aa-Яя), which is a key requirement.
  2. Email Validation: The email regex is flawed. It incorrectly requires every email to end with a dot (.) and doesn't permit many of the specified special characters (e.g., !, +, -).
  3. Incorrect Test: In src/validateRegisterForm.test.js, a test case asserts that an email containing ! is invalid, but the requirements state this is an allowed character.

Please revise the regular expressions and update the corresponding test to meet the task specifications. Keep up the great work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

Thank you for your submission. I'm requesting a few changes because the core validation logic for both password and email doesn't yet meet all the requirements. The password validation still needs to be updated to accept Cyrillic letters (Aa-Яя). For email validation, the regex is missing required special characters like ! and incorrectly requires emails to end with a period. These logic issues are also reflected in your tests, which currently treat valid inputs as invalid. Please revisit the regular expression requirements in the task description to get this finished. You're making good progress!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

I am approving this submission as an educational override to help you progress, but the core validation logic still needs to be corrected. It's great that you've added more tests, which is a good practice! However, the main issues from the previous review still remain.

The password validation is missing support for Cyrillic letters (Aa-Яя), as the character classes [a-z] and [A-Z] only match Latin letters. Additionally, the email validation rejects valid special characters (like !, #, +) and incorrectly requires the email to end with a . due to the \. at the end of the expression. Please revisit the requirements and adjust your regular expressions to handle these cases correctly. Keep up the effort!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

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