@Override
  public boolean isValid(final Object value, final String type, final Dimension dimension) {
    if (!(value instanceof PostilionAddAmount[])) {
      return false;
    }
    final PostilionAddAmount[] addAmounts = (PostilionAddAmount[]) value;
    if (addAmounts.length < 1 || addAmounts.length > 6) {
      return false;
    }
    for (final PostilionAddAmount item : addAmounts) {
      if (item == null) {
        return false;
      }
      if (item.getAccountType() == null) {
        return false;
      }
      if (item.getAmountType() == null) {
        return false;
      }
      if (item.getAmount() == null) {
        return false;
      }
      if (item.getCurrencyCode() == null) {
        return false;
      }
    }
    return true;
  }