The text input field above has the “required” attribute set. Attempting to submit the form triggers “interactive constraints validation” [1], which in turn displays a validation error message to the user (if the text field is invalid).
In addition to that, support for the reportValidity()method [2] for form controls has recently landed in Chrome Canary [3]. This method is used for manually triggering the validation error message in JavaScript, without the user having to attempt form submission.
(All links open in new tabs.)