The problem is the following in chome el.minLength - it works, Safari writes undefined. Tell me.

// html

<input type="password" placeholder="Пароль" class="auth-box__input" name="user_password" minlength="4" required> 

// jscript

 var user_password = document.getElementsByName('user_password')[0]; console.log(user_password.minLength); 

    2 answers 2

    Because you do not have it, this is your minLength in a safari.
    Did not make it there.

      Solved a problem with dataset:

      // html

        <input type="password" placeholder="Пароль" class="auth-box__input" name="user_password" minlength="4" data-length='4' required> 

      // js

       var user_password = document.getElementsByName('user_password')[0]; console.log(user_password.dataset.length)