@krebeDev
Posted
Hello @vongphakdy,
Great job on this challenge. Your error message is not being activated because HTML5 form
comes with built-in form validation. To deactivate this default behaviour and ensure your JavaScript code is triggered, add a novalidate
attribute on the form element. In your case, your code will be like so <form novalidate class="main-form">
.
Also, your JS form validation code should be enhanced to accommodate other use cases. For example, if a user enters a correct email after a wrong attempt, the error message should be discarded.
@vongphakdy
Posted
@krebeDev Thanks so much for the feedback. The novalidate
attribute worked as intended. I've also updated the validation to accept the correct email case.