public function validate()
    {
        $parameters = func_get_args();

        if ( count($parameters) == 0 )
        {
            $parameters = ['number', 'cvv', 'expiryMonth', 'expiryYear'];
        }

        foreach ($parameters as $key)
        {
            $value = $this->parameters->get($key);

            if ( empty($value) )
            {
                throw new InvalidCreditCardException("The $key parameter is required");
            }
        }

        if ( isset($parameters['expiryMonth']) && isset($parameters['expiryYear']) )
        {
            if ( $this->getExpiryDate('Ym') < gmdate('Ym') )
            {
                throw new InvalidCreditCardException('Card has expired');
            }
        }

        if ( isset($parameters['number']) )
        {
            if ( !Helper::validateLuhn( $this->getNumber() ) )
            {
                throw new InvalidCreditCardException('Card number is invalid');
            }

            if ( !is_null( $this->getNumber() ) && !preg_match( '/^\d{12,19}$/i', $this->getNumber() ) )
            {
                throw new InvalidCreditCardException('Card number should have 12 to 19 digits');
            }
        }

        if ( isset($parameters['cvv']) )
        {
            if ( !is_null( $this->getCvv() ) && !preg_match( '/^\d{3,4}$/i', $this->getCvv() ) )
            {
                throw new InvalidCreditCardException('Card CVV should have 3 to 4 digits');
            }
        }
    }