protected Object parse(String value, Locale locale) {
        value = (value == null ? null : value.trim());
        if (value == null || value.isEmpty()) {
            return null;
        }
        DecimalFormat formatter = getFormat(locale);
        return parse(value, formatter);

    }
<p>
Parse the value using the specified pattern.
</p>

@param value The value validation is being performed on.
@param locale The locale to use for the date format, system default if null.
@return The parsed value if valid or <code>null</code> if invalid.
primefaces/src/main/java/org/primefaces/util/CurrencyValidator.java