Help checking

Asked

Viewed 57 times

-6

I’m with making a record that I need verification prints an error if any of the options are changed.

My code:

$(document).ready(function(){
    $("#concluir").validate({
        rules:{
            usuario: {
                required: true,
                minlength: 6,
                maxlength: 14,
                nowhitespace: true,
                alphanumeric: true
            },
            email: {
                required: true,
                email: true
            },
            senha: {
                required: true,
                minlength: 6,
                maxlength: 14
            },
            rsenha: {
                required: true,
                equalTo: "#senhaa"
            },
            nome: {
                required: true,
                minlength: 6,
                maxlength: 14,
                nowhitespace: true,
                alphanumeric: true
            },
            submitHandler: function(form) {
                alert("Cadastrado com Sucesso!")
                form.submit()
            }
        }
    })
})
  • Dude, try to be more clear on your question, specify what you’re doing, and enter a code that you can perform the tests.

  • What is that? I’ve never seen that kind of question '-'

1 answer

1


When there is a change in select with the name="pacoteinicial" will run a callback, in my example was the console.log()

about the function change

$('body').on('change', "select[name='pacoteinicial']", function(){
    console.log('Erro: select alterado!');
});
  • Ideal would be to clarify what you did and why. Only releasing codes here without explanations will not effectively solve the issue.

  • 1

    Amended reply, thank you for the suggestion!

  • Solved, thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.