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

de.thksystems.validation.beanvalidation.LocaleValidator Maven / Gradle / Ivy

/*
 * tksCommons / mugwort
 *
 * Author : Thomas Kuhlmann (ThK-Systems, http://www.thk-systems.de) License : LGPL (https://www.gnu.org/licenses/lgpl.html)
 */
package de.thksystems.validation.beanvalidation;

import java.util.function.Predicate;

import de.thksystems.util.text.LocaleUtils;

public class LocaleValidator extends AbstractValueValidator {

    @Override
    protected Predicate getPredicate() {
        return o -> LocaleUtils.isValidLocaleCode(o.toString());
    }
}