Example usage for org.apache.commons.validator.routines AbstractFormatValidator isValid

List of usage examples for org.apache.commons.validator.routines AbstractFormatValidator isValid

Introduction

In this page you can find the example usage for org.apache.commons.validator.routines AbstractFormatValidator isValid.

Prototype

public boolean isValid(String value, Locale locale) 

Source Link

Document

Validate using the specified Locale.

Usage

From source file:org.talend.dataprep.util.NumericHelper.java

private static boolean isValid(String str, AbstractFormatValidator validator) {
    for (Locale locale : LOCALES) {
        if (validator.isValid(str, locale)) {
            return true;
        }//from  w  w w.ja  v  a 2  s. c  om
    }
    return false;
}