Bonjour,

J'ai un formulaire, que j'aimerais rendre valide XHTML..

Voici un exemple de champ :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
<label for="new_user[mail]">Votre e-mail : <br>Un e-mail de confirmation sera envoyé à cette adresse.</label> 
      <input id="new_user[mail]" name="new_user[mail]" value="">
Et quand je le passe dans le validateur du W3C, il me sort ca :
# Error Line 322, Column 26: character "[" is not allowed in the value of attribute "for".

<label for="new_user[mail]">Votre e-mail : <br />Un e-mail de confirmation



It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
# Error Line 323, Column 25: character "[" is not allowed in the value of attribute "id".

<input id="new_user[mail]" name="new_user[mail]" value=""/>



It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.

Et bon, la notation new_user[mail] est quand meme bien pratique, quand on attend la variable dans un script php..

Alors comment faire ?