• User Attivo

    jquery-validate messaggin in base alla lingua

    salve,

    come da titolo, sapete come si gestiscono i messaggi in base alla lingua?


  • User Attivo

    prova a vedere questo:

    
    <script>
    var valida = $("#registraform").validate({
        messages: {
            firstname: "Enter your firstname",
            lastname: "Enter your lastname",
            username: {
                required: "Enter a username",
                minlength: jQuery.format("Enter at least {0} characters"),
                remote: jQuery.format("{0} is already in use")
            },
            password: {
                required: "Provide a password",
                rangelength: jQuery.format("Enter at least {0} characters")
            },
            password_confirm: {
                required: "Repeat your password",
                minlength: jQuery.format("Enter at least {0} characters"),
                equalTo: "Enter the same password as above"
            },
            email: {
                required: "Please enter a valid email address",
                minlength: "Please enter a valid email address",
                remote: jQuery.format("{0} is already in use")
            },
            dateformat: "Choose your preferred dateformat",
            terms: " "
        },
    
    });
    </script>
    
    

    vedi il codice completo qui:
    http://jquery.bassistance.de/validate/demo/milk/

    spero di aver capito giusto!