All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.allbs.hj212.validator.clazz.T212MapCValidator Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package cn.allbs.hj212.validator.clazz;

import cn.allbs.hj212.model.verify.T212Map;
import cn.allbs.hj212.validator.field.C;
import cn.allbs.hj212.validator.field.CValidator;

import javax.validation.ConstraintValidator;

/**
 * @author ChenQi
 */
public class T212MapCValidator
        extends T212MapFieldValidator
        implements ConstraintValidator> {

    public T212MapCValidator() {
        super(new CValidator());
    }

    @Override
    public String getField(FieldC fieldC) {
        return fieldC.field();
    }

    @Override
    public C getAnnotation(FieldC fieldC) {
        return fieldC.value();
    }

    @Override
    public boolean isFieldRegex(FieldC fieldC) {
        return fieldC.regex();
    }

    @Override
    public String getFieldMessage(C value) {
        return value.message();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy