code: public static boolean isValid(final String value) {
          if (value == null) {
              return true;
          }
          if (value.length() == 0) {
              return false;
          }
          final int space = value.indexOf(' ');
          if (space == -1) {
              return false;
          }
  
          // Try converting amount
          final String amount = value.substring(0, space);
          if (!(amount.matches(DECIMAL) || amount.matches(INTEGER))) {
              return false;
          }
  
          // Try to convert code into a currency
          final String currencyCode = value.substring(space + 1);
          try {
              Currency.getInstance(currencyCode);
          } catch (RuntimeException ex) {
              return false;
          }
  
          return true;
      }
docs: Check that a given string is a well-formed currency amount.
  
  @param value
  Value to check.
  
  @return Returns <code>true</code> if it's a valid currency amount else <code>false</code> is returned.