As a developer you have to ensure that any users are made aware of any errors that occur and that they can determine what it is. The error message should be as specific as possible. Just to keep in mind, error messages that popup upon form submissions is not enough for certain users to perceive that an error has occurred. Users with screen readers may not necessarily know there is an error until they come across the error indicator.
Regarding the second point above, if a user enters a value that doesn't meet the required values and the form automatically changes the value to fall within the range. The error message would still need to be provided to the user as required by this criteria. An error description letting the user know of the changed value would meet the 3.3.1 criteria as well as criteria 3.3.3 (Error Suggestion)
There are few ways to ensure that your website remains compliant.
aria role="alert"
on the error label text.<ul role="alert">
<li> <label class="hs-error-msg"> Please complete this required field.</label> </li>
</ul>
aria role="alert"
on the error label text