Skip to content

Instantly share code, notes, and snippets.

@danielvlopes
Created September 12, 2008 13:57
Show Gist options
  • Save danielvlopes/10443 to your computer and use it in GitHub Desktop.
Save danielvlopes/10443 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:StringValidator source="{nome}" property="text"
required="true"
minLength="4"
requiredFieldError="Campo obrigatório"
tooShortError="Valor preenchido é muito curto"
trigger="{nome}" triggerEvent="change"
valid="status.text='Nome é válido'"/>
<mx:EmailValidator source="{email}" property="text"
required="true"
requiredFieldError="Campo obrigatório"
trigger="{btnEnviar}" triggerEvent="click"
valid="status.text='Email é válido'" />
<mx:Form>
<mx:FormItem required="true" label="Nome:">
<mx:TextInput id="nome" />
</mx:FormItem>
<mx:FormItem required="true" label="E-mail:">
<mx:TextInput id="email" />
</mx:FormItem>
</mx:Form>
<mx:Button label="Enviar" id="btnEnviar" />
<mx:Label fontSize="20" text="STATUS" id="status" />
</mx:Application>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment