public void validate(Object data)//, int length)
    {
        if (data == null) return;
        
        BigDecimal bigD;
        
        if (data instanceof BigInteger) {
            bigD = new BigDecimal((BigInteger) data);
        } else {
            bigD = (BigDecimal) data;
        }
        
        boolean negative = ZERO.compareTo(bigD) > 0;
        
        if (negative && !signed()) {
            throw (IllegalArgumentException) createEx(bigD, getName() 
                + " is not signed").fillInStackTrace();
        }
        
        int scale = bigD.scale();
        
        if (decimalPlaces() > 0) {
            if (scale > decimalPlaces()) {
                throw (IllegalArgumentException) createEx(bigD, "must have " 
                    + decimalPlaces() + " decimal places").fillInStackTrace();
            }
        }
        
        bigD = bigD.setScale(decimalPlaces());
            
        String s = bigD.unscaledValue().toString();
        
        if (negative) s = s.substring(1);
            
        if (s.length() > digits()) {
            throw (IllegalArgumentException) createEx(bigD, "must be no longer than " 
                + digits() + " digits").fillInStackTrace();
        }
    }