Bonjour

est-il possible d’empêcher l'envois d'un formulaire flex sur flex3Builder si le formulaire n'est pas valide ?

merci beaucoup de m'aider

voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
<mx:Validator id="nomValid" source="{chp_nom}" property="text"  required="true" /> 
<mx:Validator id="prenomValid" source="{chp_prenom}" property="text"  required="true" /> 
<mx:Validator id="identValid" source="{chp_identifiant}" property="text"  required="true" />
<mx:NumberValidator id="mdpValid" source="{chp_mdp}" property="text"  required="true" invalidCharError="Veuillez saisir des caractéres valid" /> 
 
             <!--  champs formulaire -->
 
<mx:Panel id="Panelform" title="Formulaires" height="190" layout="absolute" width="335">
    <mx:Form id="form" width="100%" height="116">    
		<mx:FormItem id="formIdentifiant" label="Identifiant">
			<mx:TextInput id="chp_identifiant"/>
		</mx:FormItem>
 
		<mx:FormItem id="formMotdepasse" label="Mot de passe">
			<mx:TextInput id="chp_mdp"/>
		</mx:FormItem>		
 
		<mx:Label width="253" id="message"/>
    </mx:Form>
        <mx:LinkButton id="ergst" label="Inscription" click="currentState='enregistrement'" x="209" y="124"/>
	    <mx:Button  label="Envoyer" y="124" click="{envois(chp_identifiant.text , chp_mdp.text)}" x="3" id="button1"/>
</mx:Panel>