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

de.thksystems.validation.beanvalidation.CountryValidator 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 CountryValidator extends AbstractValueValidator {

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