I have to use Mootools for a website but being a real newbie I'm stuck with my code:
var val = element.get('value');
// Here I get a number between 1 and 6 and I'd like to implement a loop that goes from 1 to the value of val (between 1 and 6)
$('jj_enfant' + val).addClass("validate['required']");
$('mm_enfant' + val).addClass("validate['required']");
$('aaaa_enfant' + val).addClass("validate['required']");
$('last_name_enfant' + val).addClass("validate['required','nodigit']");
$('first_name_enfant' + val).addClass("validate['required','nodigit']");