From htmlunit 2.43.0 and newer:
If a text input field has a parameter "maxlength" and the field contains a string of longer length, the submit is cancelled (in HtmlForm.areChildrenValid()).
Firefox 103 has a different behaviour. The form is submitted there.