What if the js verification is done when registering on this site?

< H1 > as shown in the following figure < / H1 >
after submitting the form, a tips pops up to show the error content. Do you use any js libraries?

Mar.07,2021

<input required type="text" />

this is new to HTML5 and is supported by mainstream browsers.


Instead of relying on third-party libraries, use the required attribute of html5 directly. The
required attribute states that the input field must be completed before submission, and if this attribute is used, the field is required (or required). The
required attribute applies to the following < input > types: text , search , url , telephone , email , password , date pickers , number , checkbox , radio and code .

case:

<form action="/api/register" method="get">
  : <input type="text" name="usr_name" required="required" />
  : <input type="text" name="usr_password" required="required" />
  <input type="submit" value="" />
</form>

MDN-form data check


the style in the screenshot is obviously included with Chrome. It is usually implemented as required and pattern .


there are typos in the title.

Menu