当前位置: 首页>>代码示例>>Java>>正文


Java ValidationError.getCollatedErrorMessage方法代码示例

本文整理汇总了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;
        }
    }
}
 
开发者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: 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();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:UpdateEventFragment.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()).setError(message);
        }
    }
}
 
开发者ID:scott7462,项目名称:Udacity-Capstone-Project,代码行数:11,代码来源:RegisterFragment.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()).setError(message);
        }
    }
}
 
开发者ID:scott7462,项目名称:Udacity-Capstone-Project,代码行数:11,代码来源:FrgProfile.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(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();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:UpdateMedicalRecFragment.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);

        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

示例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();
        }
    }
}
 
开发者ID:Hotmart-Org,项目名称:zum-android,代码行数:14,代码来源:SignUpActivity.java

示例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);

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

示例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();
        }
    }
}
 
开发者ID:thandile,项目名称:msf_communique,代码行数:15,代码来源:CreateMedicalRecFragment.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


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