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

com.github.ankurpathak.bean.constraints.validator.EndWithAlphaNumericValidator Maven / Gradle / Ivy

Go to download

Java library for username validation for general use and with bean validation api.

There is a newer version: 1.4.0
Show newest version
package com.github.ankurpathak.bean.constraints.validator;


import com.github.ankurpathak.UsernameValidator;
import com.github.ankurpathak.bean.constraints.EndWithAlphaNumeric;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * Created by ankur on 04-02-2017.
 */
public class EndWithAlphaNumericValidator implements ConstraintValidator {

    private EndWithAlphaNumeric config;

    @Override
    public void initialize(EndWithAlphaNumeric endWithAlphaNumeric) {
        this.config = config;
    }

    @Override
    public boolean isValid(String username, ConstraintValidatorContext constraintValidatorContext) {
        return UsernameValidator.endWithAlphaNumeric(username);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy