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

nl.vpro.validation.NoHtmlListValidator Maven / Gradle / Ivy

There is a newer version: 5.3.2
Show newest version
/*
 * 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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy