
$(document).ready(function(){


    $("#bankForm").validate({
        rules: {
            'data[Register][bic]': {
                required: true
            },
            'data[Register][iban]': {
                required: true,
                remote: {
					url: baseUrl+'vets/IBANVERIFICATION',
					type: "post",
					data: {
					  iban: function() {
						return $("#RegisterIban").val();
					  }
				   },

                    complete: function(data){
                      
                      
                       if( data.responseText == "false" ) {
                            
                            $('#RegisterIban-error').show();
                            
                        
                       }else{

                            $('#RegisterIban-error').hide();

                       }
                    }
				}
            }
           
        },
        messages: {
            'data[Register][bic]': {
                required: "Please enter Bank Identifier Code."
            },
            'data[Register][iban]': {
                required: "Please enter International Bank Account Number.",
                remote: "Please provide a valid IBAN."
            }
            
        }
    });
	


});

