HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>The assignment the boss gave us is almost finished: users will no longer be able to post comments that are too long. If the text in the input field is longer than 142 characters, the submit button is locked and an error message appears. In this case, the user must correct the comment. Currently the error message does not disappear, and the submit button is not locked even if the text is shortened to the required length. How can we fix this problem?</p>
1 <p>The assignment the boss gave us is almost finished: users will no longer be able to post comments that are too long. If the text in the input field is longer than 142 characters, the submit button is locked and an error message appears. In this case, the user must correct the comment. Currently the error message does not disappear, and the submit button is not locked even if the text is shortened to the required length. How can we fix this problem?</p>
2 <p>We need the<a>alternative branch</a> else: if the condition is false, that is, the comment is no longer than 142 characters, then we need to write false to the disabled button property, and we need to remove the warning class from the form.</p>
2 <p>We need the<a>alternative branch</a> else: if the condition is false, that is, the comment is no longer than 142 characters, then we need to write false to the disabled button property, and we need to remove the warning class from the form.</p>
3 <p>Add a second branch to our script along with any required instructions and check that now everything works as it should: if the comment is too long, the button is locked and an error message appears. If the character limit is not exceeded, the button is unlocked and the error message disappears.</p>
3 <p>Add a second branch to our script along with any required instructions and check that now everything works as it should: if the comment is too long, the button is locked and an error message appears. If the character limit is not exceeded, the button is unlocked and the error message disappears.</p>