Preethu Alex
Preethu Alex

Reputation: 57

Jquery Form Validation

I am using the following validation code on my web app

demo : http://www.position-relative.net/creation/formValidator/demos/demoValidators.html

is there any way to hide that popup thing after 10 second ? now when you submit its keep displaying ....

these are the codes used for ceating that effect

http://www.position-relative.net/creation/formValidator/js/languages/jquery.validationEngine-en.js http://www.position-relative.net/creation/formValidator/js/jquery.validationEngine.js

<script>
        jQuery(document).ready(function(){
            // binds form submission and fields to the validation engine
            jQuery("#formID").validationEngine();
        });

        /**
        *
        * @param {jqObject} the field where the validation applies
        * @param {Array[String]} validation rules for this field
        * @param {int} rule index
        * @param {Map} form options
        * @return an error string if validation failed
        */
        function checkHELLO(field, rules, i, options){
            if (field.val() != "HELLO") {
                // this allows to use i18 for the error msgs
                return options.allrules.validate2fields.alertText;
            }
        }
    </script>

Upvotes: 0

Views: 232

Answers (2)

Ankur Bhadania
Ankur Bhadania

Reputation: 4158

var t = setInterval(function() {
   //alert('b');
   $(".formErrorContent").hide();
   $(".line1").hide();$(".line2").hide();$(".line3").hide();$(".line4").hide();$(".line5").hide();
   $(".line6").hide();$(".line7").hide();$(".line8").hide();$(".line9").hide();$(".line10").hide();
   },8000);

Upvotes: 4

ankit
ankit

Reputation: 455

this code put on above header tag

<script>

    setInterval(function() {
        $(".formError").parent('.formErrorOuter').remove();
        $(".formError").remove();
},  2000);
</script>

try it.it's work

Upvotes: 3

Related Questions