Skip to content
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

Solution #2683

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Solution #2683

wants to merge 1 commit into from

Conversation

Bajkowsky
Copy link

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.

Great job on implementing the core functionality and meeting the task requirements! 🎉 The form validation, error handling, and state management are well-executed, and your attention to detail is evident. Keep up the excellent work, and continue refining your skills! 😊

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

Comment on lines +56 to +61
<form
className="NewMovie"
key={count}
onSubmit={handleFormSubmit}
onReset={reset}
>

Choose a reason for hiding this comment

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

Consider implementing onBlur validation for required fields to show errors and a red border if the input is invalid. This is part of the task requirements to ensure fields are validated when they lose focus.

Comment on lines +109 to +114
disabled={
!isValid(title) ||
!isValid(imgUrl) ||
!isValid(imdbUrl) ||
!isValid(imdbId)
}

Choose a reason for hiding this comment

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

Ensure that the submit button is disabled until all required fields are filled with valid, trimmed values. This is a task requirement to prevent submission of incomplete data.

<form className="NewMovie" key={count}>
<form
className="NewMovie"
key={count}

Choose a reason for hiding this comment

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

Change the form's key to reinitialize it after resetting to clear errors. This is necessary to ensure errors are not shown after clearing the form, as per the task requirements.

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