i am creating my custom EditText which validate email and other things on focus lost and if it is not valid then focus back. It works fine if i have only one EditText but when i have multiple EditText it infinity focuses between my editText boxes as it try to check validation in both. Here is my sample code.

```
public void init(){

   this.setOnFocusChangeListener(new OnFocusChangeListener() {

    @Override
    public void onFocusChange(View v, boolean hasFocus) {
    // TODO Auto-generated method stub
    final MyEditText ed = MyEditText.this;

    //...............check require field validation
    if(!hasFocus && isRequire){
      if(ed.getText().toString().length()<=0){
           String msg = "Require Field";
            v.clearFocus();
        setErrorMsg(ed,msg);

        return;
                            }
    }else if(ed.getText().toString().length()>0){
        ed.setError(null);
    }
    }
}

private void setErrorMsg(final EditText ed,String msg){

  if(errorMessage!=null && errorMessage.length()>0){
    msg = errorMessage;
   }

  ed.setError(msg); 

  ed.post(new Runnable() {
    public void run() {
       ed.requestFocus();

    }
 });
}

```