<script type="text/javascript" src="http://devote.github.io/files/letjs/let.js"></script>
<script type="text/javascript">
letJS.setHandler('data-action', function(rules) {
if (rules.expectedValue.length == +rules.rule) {
document.getElementById('debug').innerHTML = rules.rule + ' чисел вбил(а) ты';
} else {
document.getElementById('debug').innerHTML = '';
}
});
</script>
<input type="text" data-action="13" data-let-input="/[0-9]+/" />
<div id="debug"></div>