com.github.rkpunjal.sqlsafe.SQLInjectionSafeValidator Maven / Gradle / Ivy
package com.github.rkpunjal.sqlsafe;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* SQLInjectionSafeValidator
* The Constraint validator for for the annotation SQLInjectionSafe
*
* @author Ramakrishna Punjal
* @version 1.0.0
* @since 2016-08-26
* @see SQLInjectionSafe
*
*/
public class SQLInjectionSafeValidator implements ConstraintValidator {
public void initialize(SQLInjectionSafe sqlInjectionSafe) { }
public boolean isValid(String dataString, ConstraintValidatorContext cxt) {
return SqlSafeUtil.isSqlInjectionSafe(dataString);
}
}