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


Java Field类代码示例

本文整理汇总了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));
}
 
开发者ID:alouanemed,项目名称:EvGuide,代码行数:12,代码来源:LoginEv.java

示例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()));
}
 
开发者ID:alouanemed,项目名称:EvGuide,代码行数:10,代码来源:Organizer_event_create.java

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

示例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()));
}
 
开发者ID:alouanemed,项目名称:EvGuide,代码行数:10,代码来源:OrganizerEvInfosFragment.java

示例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));
}
 
开发者ID:alouanemed,项目名称:EvGuide,代码行数:16,代码来源:SignUp.java

示例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)));
}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:9,代码来源:SampleActivity.java

示例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));
}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:8,代码来源:NotEmpty.java

示例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));
}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:9,代码来源:IsEmail.java

示例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));
}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:9,代码来源:HasMinimumLength.java

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

}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:9,代码来源:ConfirmPassword.java

示例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));
}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:9,代码来源:IsPositiveInteger.java

示例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));
}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:14,代码来源:InRange.java

示例13: build

import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
public static ConfirmPassword build(Context ctx, Field passwordField) {
    return new ConfirmPassword(ctx, passwordField);
}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:4,代码来源:ConfirmPassword.java

示例14: ConfirmPassword

import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
public ConfirmPassword(Context ctx, Field passwordField) {
    super(ctx);
    this.passwordField = passwordField;
}
 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:5,代码来源:ConfirmPassword.java

示例15: validate

import ua.org.zasadnyy.zvalidations.Field; //导入依赖的package包/类
ValidationResult validate(Field field); 
开发者ID:zasadnyy,项目名称:z-validations,代码行数:2,代码来源:Validation.java


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