本文整理汇总了Java中ua.org.zasadnyy.zvalidations.Field类的典型用法代码示例。如果您正苦于以下问题:Java Field类的具体用法?Java Field怎么用?Java Field使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Field类属于ua.org.zasadnyy.zvalidations包,在下文中一共展示了Field类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initValidationForm
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
private void initValidationForm() {
mForm = new Form(this);
mForm.setValidationFailedRenderer(new com.lpii.evma.controller.CroutonValidationFailedRenderer(this));
mForm.addField(Field.using(etUsername).validate(NotEmpty.build(this)));
mForm.addField(Field.using(etPassword).validate(NotEmpty.build(this)));
//mForm.addField(Field.using(mAge).validate(InRange.build(this, 0, 120)));
mForm.getValidationFailedRenderer().clear();
mForm.setValidationFailedRenderer(new TextViewValidationFailedRenderer(this));
}
示例2: initValidationForm
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
private void initValidationForm() {
mForm = new Form(getActivity());
mForm.setValidationFailedRenderer(new CroutonValidationFailedRenderer(getActivity()));
mForm.addField(Field.using(etEventTitle.getEditText()).validate(NotEmpty.build(getActivity())));
mForm.getValidationFailedRenderer().clear();
mForm.setValidationFailedRenderer(new TextViewValidationFailedRenderer(getActivity()));
}
示例3: initValidationForm
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
private void initValidationForm() {
mForm = new Form(getActivity());
mForm.setValidationFailedRenderer(new CroutonValidationFailedRenderer(getActivity()));
mForm.addField(Field.using(etpack_Title.getEditText()).validate(NotEmpty.build(getActivity())));
mForm.addField(Field.using(et_Pack_Description.getEditText()).validate(NotEmpty.build(getActivity())));
mForm.addField(Field.using(et_Pack_pricex.getEditText()).validate(NotEmpty.build(getActivity())));
mForm.addField(Field.using(etpack_fees.getEditText()).validate(NotEmpty.build(getActivity())));
mForm.addField(Field.using(etpack_Qty.getEditText()).validate(NotEmpty.build(getActivity())));
mForm.getValidationFailedRenderer().clear();
mForm.setValidationFailedRenderer(new TextViewValidationFailedRenderer(getActivity()));
}
示例4: initValidationForm
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
private void initValidationForm() {
mForm = new Form(getActivity());
mForm.setValidationFailedRenderer(new CroutonValidationFailedRenderer(getActivity()));
mForm.addField(Field.using(et_evTitle.getEditText()).validate(NotEmpty.build(getActivity())));
mForm.getValidationFailedRenderer().clear();
mForm.setValidationFailedRenderer(new TextViewValidationFailedRenderer(getActivity()));
}
示例5: initValidationForm
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
private void initValidationForm() {
mForm = new Form(this);
mForm.setValidationFailedRenderer(new com.lpii.evma.controller.CroutonValidationFailedRenderer(this));
mForm.addField(Field.using(etFirstName.getEditText()).validate(NotEmpty.build(this)));
mForm.addField(Field.using(etLastName.getEditText()).validate(NotEmpty.build(this)));
mForm.addField(Field.using(etUsername.getEditText()).validate(NotEmpty.build(this)));
mForm.addField(Field.using(etEmail.getEditText()).validate(NotEmpty.build(this)));
mForm.addField(Field.using(etPassword.getEditText()).validate(NotEmpty.build(this)));
//mForm.addField(Field.using(mAge).validate(InRange.build(this, 0, 120)));
mForm.getValidationFailedRenderer().clear();
mForm.setValidationFailedRenderer(new TextViewValidationFailedRenderer(this));
}
示例6: initValidationForm
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
private void initValidationForm() {
mForm = new Form(this);
mForm.setValidationFailedRenderer(new CroutonValidationFailedRenderer(this));
mForm.addField(Field.using(mName).validate(NotEmpty.build(this)));
mForm.addField(Field.using(mEmail).validate(NotEmpty.build(this)).validate(IsEmail.build(this)));
mForm.addField(Field.using(mAge).validate(InRange.build(this, 0, 120)));
}
示例7: validate
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
@Override
public ValidationResult validate(Field field) {
boolean isValid = !TextUtils.isEmpty(field.getTextView().getText());
return isValid ?
ValidationResult.buildSuccess(field.getTextView())
: ValidationResult.buildFailed(field.getTextView(), mContext.getString(R.string.zvalidations_empty));
}
示例8: validate
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
@Override
public ValidationResult validate(Field field) {
EditText textView = field.getTextView();
boolean isValid = textView.getText().toString().matches(EMAIL_PATTERN);
return isValid ?
ValidationResult.buildSuccess(textView)
: ValidationResult.buildFailed(textView, mContext.getString(R.string.zvalidations_not_email));
}
示例9: validate
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
@Override
public ValidationResult validate(Field field) {
EditText textView = field.getTextView();
int textLength = textView.getText().toString().length();
return textLength >= mMin ?
ValidationResult.buildSuccess(textView)
: ValidationResult.buildFailed(textView, mContext.getString(R.string.zvalidations_too_short, mMin));
}
示例10: validate
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
@Override
public ValidationResult validate(Field field) {
boolean isValid = field.getTextView().getText().toString().equals(passwordField.getTextView().getText().toString());
return isValid ?
ValidationResult.buildSuccess(field.getTextView())
: ValidationResult.buildFailed(field.getTextView(), mContext.getString(ua.org.zasadnyy.zvalidations.R.string.zvalidations_passwords_dont_match));
}
示例11: validate
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
@Override
public ValidationResult validate(Field field) {
EditText textView = field.getTextView();
boolean isValid = textView.getText().toString().matches(POSITIVE_INT_PATTERN);
return isValid ?
ValidationResult.buildSuccess(textView)
: ValidationResult.buildFailed(textView, mContext.getString(R.string.zvalidations_not_positive_integer));
}
示例12: validate
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
@Override
public ValidationResult validate(Field field) {
EditText textView = field.getTextView();
boolean isValid = false;
try {
int value = Integer.parseInt(textView.getText().toString());
isValid = (value > mMin) && (value < mMax);
} catch (NumberFormatException ignored) {
}
return isValid ?
ValidationResult.buildSuccess(textView)
: ValidationResult.buildFailed(textView, mContext.getString(R.string.zvalidations_not_in_range, mMin, mMax));
}
示例13: build
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
public static ConfirmPassword build(Context ctx, Field passwordField) {
return new ConfirmPassword(ctx, passwordField);
}
示例14: ConfirmPassword
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
public ConfirmPassword(Context ctx, Field passwordField) {
super(ctx);
this.passwordField = passwordField;
}
示例15: validate
import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
ValidationResult validate(Field field);