• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ValidationError类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.mobsandgeeks.saripaar.ValidationError的典型用法代码示例。如果您正苦于以下问题:Java ValidationError类的具体用法?Java ValidationError怎么用?Java ValidationError使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ValidationError类属于com.mobsandgeeks.saripaar包,在下文中一共展示了ValidationError类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    final SweetAlertDialog errorDialog = new SweetAlertDialog(this, SweetAlertDialog.ERROR_TYPE);
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(this);

        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            errorDialog.setTitleText("Oops...");
            errorDialog.setContentText(message);
            errorDialog.show();
            return;
        }
    }
}
 
开发者ID:CycloneAxe,项目名称:phphub-android,代码行数:18,代码来源:TopicPublishActivity.java


示例2: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(this);

        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(this, message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:hernandazevedo,项目名称:starwarsshop,代码行数:14,代码来源:BaseActivity.java


示例3: initValidator

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
private Validator initValidator() {
    Validator validator = new Validator(this);
    validator.setValidationListener(new Validator.ValidationListener() {
        @Override
        public void onValidationSucceeded() {
            view.hideKeyboard();
            user.setFirstName(binding.etFirstName.getText().toString());
            user.setLastName(binding.etLastName.getText().toString());
            user.setAge(Integer.valueOf(binding.etAge.getText().toString()));
            presenter.updateUser(user);
        }

        @Override
        public void onValidationFailed(List<ValidationError> errors) {
            for (ValidationError error : errors) {
                View view1 = error.getView();
                String message = error.getCollatedErrorMessage(EditProfileActivity.this);

                if (view1 instanceof EditText) {
                    ((EditText) view1).setError(message);
                } else {
                    EditProfileActivity.this.view.showMessage(message);
                }
            }
        }
    });
    return validator;
}
 
开发者ID:ihorvitruk,项目名称:buddysearch,代码行数:29,代码来源:EditProfileActivity.java


示例4: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(getActivity());
        if (view instanceof AppCompatEditText) {
            ((TextInputLayout) view.getParent().getParent()).setErrorEnabled(true);
            ((TextInputLayout) view.getParent().getParent()).setError(message);
        }
    }
}
 
开发者ID:scott7462,项目名称:Udacity-Capstone-Project,代码行数:12,代码来源:SessionFragment.java


示例5: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(getActivity());
        if (view instanceof AppCompatEditText) {
            ((TextInputLayout) view.getParent().getParent()).setError(message);
        }
    }
}
 
开发者ID:scott7462,项目名称:Udacity-Capstone-Project,代码行数:11,代码来源:RegisterFragment.java


示例6: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(getActivity());
        if (view instanceof AppCompatEditText) {
            ((TextInputLayout) view.getParent()).setError(message);
        }
    }
}
 
开发者ID:scott7462,项目名称:Udacity-Capstone-Project,代码行数:11,代码来源:FrgProfile.java


示例7: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(this);

        // Display error messages ;)
        if (view instanceof TextInputEditText) {
            ((TextInputEditText) view).setError(message);
        } else {
            showError(view, message);
        }
    }
}
 
开发者ID:Hotmart-Org,项目名称:zum-android,代码行数:15,代码来源:AuthenticatorActivity.java


示例8: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(this);

        if (view instanceof TextView) {
            ((TextInputLayout) view.getParent()).setError(message);
        } else {
            Snackbar.make(view, message, Snackbar.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:Hotmart-Org,项目名称:zum-android,代码行数:14,代码来源:PlacesCreateActivity.java


示例9: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(this);

        if (view instanceof TextInputEditText) {
            ((TextInputEditText) view).setError(message);
        } else {
            Snackbar.make(view, message, Snackbar.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:Hotmart-Org,项目名称:zum-android,代码行数:14,代码来源:SignUpActivity.java


示例10: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError mError : errors) {
        String mErrorMessage = mError.getCollatedErrorMessage(this);
        View mView = mError.getView();
        if (mView instanceof AppCompatEditText)
            ((AppCompatEditText) mView).setError(mErrorMessage);

    }
}
 
开发者ID:brunogabriel,项目名称:AndroidSocketChatRoom,代码行数:11,代码来源:ChatActivity.java


示例11: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(CreateAdmissionFragment.this.getActivity());
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(CreateAdmissionFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:13,代码来源:CreateAdmissionFragment.java


示例12: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(UpdateAdmissionFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(UpdateAdmissionFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:UpdateAdmissionFragment.java


示例13: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(CreateOutcomeFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(CreateOutcomeFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:createOutcomeFragment.java


示例14: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(UpdateOutcomeFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(UpdateOutcomeFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:UpdateOutcomeFragment.java


示例15: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(UpdateEnrollmentFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(UpdateEnrollmentFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:UpdateEnrollmentFragment.java


示例16: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(CreateEnrollmentFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(CreateEnrollmentFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:CreateEnrollmentFragment.java


示例17: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(UpdateCounsellingFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(UpdateCounsellingFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:UpdateCounsellingFragment.java


示例18: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(CreateCounsellingFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(CreateCounsellingFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:CreateCounsellingFragment.java


示例19: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(UpdateAppointmentFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(UpdateAppointmentFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:UpdateAppointmentFragment.java


示例20: onValidationFailed

import com.mobsandgeeks.saripaar.ValidationError; //导入依赖的package包/类
@Override
public void onValidationFailed(List<ValidationError> errors) {
    for (ValidationError error : errors) {
        View view = error.getView();
        String message = error.getCollatedErrorMessage(CreateAppointmentFragment.this.getActivity());

        // Display error messages ;)
        if (view instanceof EditText) {
            ((EditText) view).setError(message);
        } else {
            Toast.makeText(CreateAppointmentFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:CreateAppointmentFragment.java



注:本文中的com.mobsandgeeks.saripaar.ValidationError类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NoOpPasswordEncoder类代码示例发布时间:2022-05-21
下一篇:
Java MatchCode类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap