nl.vpro.validation.NoHtmlListValidator Maven / Gradle / Ivy
/*
* Copyright (C) 2011 All rights reserved
* VPRO The Netherlands
*/
package nl.vpro.validation;
import java.util.Collection;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import nl.vpro.util.TextUtil;
@Deprecated
public class NoHtmlListValidator implements ConstraintValidator> {
@Override
public boolean isValid(Collection value, ConstraintValidatorContext constraintValidatorContext) {
if(value == null) {
return true;
}
for (String v : value) {
if (! TextUtil.isValid(v)) {
return false;
}
}
return true;
}
}