Container successful
The container successful method
onContainerSuccess: function(container){
//your logic here
}
The onContainerSuccess
method will receive as a parameter the container.
Important
If your container is not a form element, you must define a method that will process your data form. If you don't configure onContainerSuccess
method your form
will not do anything.
Usage example
The Html:
The Javascript:
var config = {
onContainerSuccess: function(container){
var login = document.getElementById('login').value;
var password = document.getElementById('password').value;
var data = {
login: login,
password: passord
};
someMethodSendAjax(data);
}
};
var validator = new VanillaValidator(config);