Skip to content

Instantly share code, notes, and snippets.

@danielvlopes
Created September 12, 2008 14:43
Show Gist options
  • Save danielvlopes/10451 to your computer and use it in GitHub Desktop.
Save danielvlopes/10451 to your computer and use it in GitHub Desktop.
//Função chamada no evento de CLICK do botão Cadastrar
private function cadastrarClickHandler():void{
var evTituloValid:ValidationResultEvent = tituloValidator.validate();
var evTextoValid :ValidationResultEvent = textoValidator.validate();
//valida os campos obrigatórios
if ((evTituloValid.type== ValidationResultEvent.VALID) &&
(evTextoValid.type == ValidationResultEvent.VALID))
Alert.show('Validações com sucesso, agora envie para o SERVER', 'Sucesso');
else
Alert.show('Você deve preencher os campos corretamente', 'Erro, campos inválidos');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment