Почему js код выдает в форме ошибку?

Здравствуйте почему данный код выдает ошибку?

<div class="input-group-wrap">
                <div data-error="Пожалуйста, заполните это поле" data-error-pass="Введите 6 либо более символов"
                     class="input-group input-group_all-width">
                    <label class="input-group__label">Ваш пароль
                    </label>
                    <div class="input-group__input input-group__input-ic">
                        <input name="password" type="password" id="password" placeholder="Ваш пароль" required=""
                               data-validate="pass">
                    </div>
                </div>
            </div>


function passwordChecker() {
        var passwordInput = document.getElementById("password")
            , bigLetter = /[A-Z]+/
            , smallLetter = /[a-z]+/
            , countLetter = /\d+/;
        passwordInput && (passwordInput.oninput = function() {
                var passwordInputValue = document.getElementById("password").value;
                passwordInputValue.length >= 6 ? $("#count_letter").attr("class", "active") : $("#count_letter").removeClass("active"),
                smallLetter.test(passwordInputValue) ? $("#small_letter").attr("class", "active") : $("#small_letter").removeClass("active"),
                bigLetter.test(passwordInputValue) ? $("#big_letter").attr("class", "active") : $("#big_letter").removeClass("active"),
                countLetter.test(passwordInputValue) ? $("#number_symbol").attr("class", "active") : $("#number_symbol").removeClass("active")
            }
        )
    }


Всегда выводит "Введите 6 либо более символов". Спасибо заранее!
  • Вопрос задан
  • 59 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы