0 Replies Latest reply on Aug 22, 2007 4:39 AM by Ami11

    Validation Issue

      Hi all,

      I am developing a login form and as usual, I have 2 textInput controls. I have emailValidator and a stringValidator on those textInputs. Now I want that the login details should get submitted on pressing enter key in any of the TextInput control. It requires me to do focus out and then press enter to fire the service. Following is the code.

      <mx:EmailValidator id="emailV" source="{emailTextInput}"
      valid="emailValidator=true;" property="text"
      requiredFieldError="Please enter username"

      <mx:StringValidator id="passwordV" source="{passwordTextInput}" property="text"
      required="true" requiredFieldError="Please enter password"
      valid="passwordValidator=true;" minLength="4"/>

      public function login():void
      if(emailValidator==true && passwordValidator==true)
      var loginEvent:LoginEvent=new LoginEvent(loginModel.loginVO);
      Please suggest me what I can do to solve this. Thanks in advance.