本文整理汇总了Java中com.mobsandgeeks.saripaar.ValidationError.getCollatedErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:Java ValidationError.getCollatedErrorMessage方法的具体用法?Java ValidationError.getCollatedErrorMessage怎么用?Java ValidationError.getCollatedErrorMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.mobsandgeeks.saripaar.ValidationError
的用法示例。
在下文中一共展示了ValidationError.getCollatedErrorMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
}
}
示例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();
}
}
}
示例3: 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(UpdateEventFragment.this.getActivity());
// Display error messages ;)
if (view instanceof EditText) {
((EditText) view).setError(message);
} else {
Toast.makeText(UpdateEventFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
}
}
}
示例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()).setError(message);
}
}
}
示例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()).setError(message);
}
}
}
示例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(UpdateMedicalRecFragment.this.getActivity());
// Display error messages ;)
if (view instanceof EditText) {
((EditText) view).setError(message);
} else {
Toast.makeText(UpdateMedicalRecFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
}
}
}
示例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);
if (view instanceof TextView) {
((TextInputLayout) view.getParent()).setError(message);
} else {
Snackbar.make(view, message, Snackbar.LENGTH_LONG).show();
}
}
}
示例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 TextInputEditText) {
((TextInputEditText) view).setError(message);
} else {
Snackbar.make(view, message, Snackbar.LENGTH_LONG).show();
}
}
}
示例9: 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);
}
}
示例10: 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(CreateMedicalRecFragment.this.getActivity());
// Display error messages ;)
if (view instanceof EditText) {
((EditText) view).setError(message);
} else {
Toast.makeText(CreateMedicalRecFragment.this.getActivity(), message, Toast.LENGTH_LONG).show();
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}