let RL = 0;

function showForm() {
  if (RL === 0) {
    $(".register-container").addClass("active");
    $(".login-container").removeClass("active");
    RL = 1;
    return;
  }
  $(".login-container").addClass("active");
  $(".register-container").removeClass("active");
  RL = 0;
  return;
}

$(document).ready(function () {
  $.validator.addMethod(
    "regex",
    function (value, element, regexp) {
      return this.optional(element) || regexp.test(value);
    },
    "Formato inválido.",
  );

  $(".showLR").on("click", function () {
    showForm();
  });
});
