How do we detect HTML "required" attribute text in Codeceptjs?

I need to validate HTML5 ‘required’ text in a textbox.
The scenario is when I click submit button it validates empty feature of a text box where HTML5 ‘required’ attribute is implemented. The error message cannot be grabed from HTML DOM as it comes from HTML5.

Is there any API of codeceptjs which can detect HTML5 error message?

@nadimsaker why do you want to test a browser API (“required”) with your e2e test? That does not make sense to me :slight_smile:

@paulb Thank you for your question.

Actually I have a form that has a Name and date of birth text boxes. Both are required. When I keep them empty and click on the Submit button, I see the error message as tooltip. This message is not rendered at DOM. It comes from HTML5 required attribute. I need to verify the message. How can I do that?