$('#err input').bind('blur keyup',function() {
$(this).data('errors', "ABC " + $(this).data('err') + " " + $(this).val());
});
$('#go').click(function(){
var code = "";
$("#err input").each(function(){
code += $(this).data('errors') + "\n" || '';
});
$('#x').html(code);
});
HTML:
<div id="err">
<input data-err="A" id="e-1" type="text"/>
<input data-err="B" id="e-2" type="text"/>
<input data-err="C" id="e-3" type="text"/>
</div>
How to make validation, if Input will be empty, then this Input not will be processed?