function sendit() {
  const form = document.querySelector("form[name='myform']");
  const element = document.getElementById("nickname");
  if (element.validity.patternMismatch || element.validity.valueMissing) {
    alert("The nickname must have a minimum of 3 characters");
  } else {
    form.requestSubmit();
  }
}