!function () {
document.getElementById('bankCard').onkeyup = function (event) {
var v = this.value;
if(/\S{5}/.test(v)){
this.value = v.replace(/\s/g, '').replace(/(.{4})/g, "$1 ");
}
};
}();