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

cn.allbs.hj212.validator.clazz.T212MapNValidator 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.N;
import cn.allbs.hj212.validator.field.NValidator;

import javax.validation.ConstraintValidator;

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

    public T212MapNValidator() {
        super(new NValidator());
    }

    @Override
    public String getField(FieldN fieldN) {
        return fieldN.field();
    }

    @Override
    public N getAnnotation(FieldN fieldN) {
        return fieldN.value();
    }

    @Override
    public boolean isFieldRegex(FieldN fieldN) {
        return fieldN.regex();
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy