Validates the expiry date of a card
@param {number} expMonth Expiry month
@param {number} expYear Expiry year
@param {Function} success
@param {Function} error
178844
function(expMonth, expYear, success, error) {
    success = success || noop;
    error = error || noop;
    exec(success, error, "CordovaStripe", "validateExpiryDate", [expMonth, expYear]);
  }
623113
function (options, callback) {
            MongoClient.connect(connString, function (err, db) {
                var at = db.collection(collection);
                at.findOne({
                    'appId': options.appId,
                    'appSecret': options.appSecret,
                    'expire': {'$gt': new Date()}
                }, function (err, at) {
                    db.close();
                    if(at == null){
                        callback('error');
                    } else {
                        callback(err, at.token);
                    }
                });
            });
        }
237587
def certify_date(value, required=True):
    
    if certify_required(
        value=value,
        required=required,
    ):
        return

    if not isinstance(value, date):
        raise CertifierTypeError(
            message="expected timestamp (date∂), but value is of type {cls!r}".format(
                cls=value.__class__.__name__),
            value=value,
            required=required,
        )
822204
function setKey(key, val, flag, expiry, xflag, req) {
  var exists = this._data[key] !== undefined;
  var o = {v: val, t: Date.now()};
  if((xflag === Constants.NX && exists)
    || (xflag === Constants.XX && !exists)) {
    return undefined;
  }
  this._data[key] = o;
  if(!exists) {
    this._keys.push(key);
  }
  if((flag === Constants.EX || flag === Constants.PX)
    && expiry !== undefined) {
    expiry = flag === Constants.EX
      ? Date.now() + (expiry * 1000)
      : Date.now() + expiry;
    this.setExpiry(key, expiry, req);
  }
  return Constants.OK;
}
544798
def validate_exp(max_clock_skew = 0)
      max_clock_skew ||= 0

      exp = time_claim("exp")
      if exp && exp <= (Time.now - max_clock_skew)
        raise Sandal::ExpiredTokenError, "The token has expired." 
      end
    end
695043
function onInvalidData(code, message, _statusCode) {
      var err = new Error();
      if(typeof message === 'undefined') {
        err.code = 'INVALID_DATA';
        err.message = code;
      } else {
        err.code = code;
        err.message = message;
      }
      if(typeof _statusCode === 'number') {
        err.statusCode = _statusCode;
      }
      function InvalidValidationWrapper() {
        return validateFunc.apply(this, arguments);
      }
      InvalidValidationWrapper.error = err;
      return InvalidValidationWrapper;
    }
928140
def set_expire(self, new_expire, only_read=False):
        
        if not isinstance(new_expire, int) or new_expire < 0:
            self.logger.warning('Parameter new_expire %s must be positive number' % new_expire)
            return
        self.expire = new_expire
667912
public static function isMonthValid($card)
	{
		$isValid = false;

		if(isset($card['expiryMonth'])) {

			$isExpiryMonthEmpty = CheckoutApi_Lib_Validator::isEmpty($card['expiryMonth'],false);
			
			if(!$isExpiryMonthEmpty && CheckoutApi_Lib_Validator::isInteger($card['expiryMonth']) && ($card['expiryMonth']  > 0 && $card['expiryMonth'] < 13)) {
				$isValid = true;
			} 
		} 

		return $isValid;
	}
1284035
function(key, value, expiration) {

            // set item
            var ret = this._storage.setItem(key, value);

            // set expiration timestamp (only if defined)
            if (expiration) {
                this.updateExpiration(key, expiration);
            }

            // return set value return value
            return ret;
        }
474183
def on_expiration(self, session, ese=None, session_key=None):
        
        super().on_expiration(session, ese, session_key)
        self.on_invalidation(session_key)
881783
def expires_at(self):
        
        if 'SignatureExpirationTime' in self._signature.subpackets:
            expd = next(iter(self._signature.subpackets['SignatureExpirationTime'])).expires
            return self.created + expd
        return None
1001926
function(err) {
    var validationErrMsg = self.handleError(err)
    if (!validationErrMsg) return false
    else { 
      self._merge(validationErrors, validationErrMsg, prefix)
      isValid = false
      return true
    }
  }
568053
function(condition, successTempl, failTempl) {
		successTempl = (typeof successTempl === 'string') ? y().use(successTempl) : successTempl;
		if (failTempl)
			failTempl = (typeof failTempl === 'string') ? y().use(failTempl) : failTempl;
		return this.exec('if', [interpolable(condition), successTempl, failTempl]);
	}
517273
function validate(res, result) {
  if (!result) return true;

  var err = new Error('Validation failed');
  try {
    err.errors = result.errors();
  } catch (err) {
    err.errors = [result.validation];
  }
  err.expose = true;
  err.statusCode = 400;
  err.toJSON = function() {
    return {
      message: this.message,
      errors: this.errors,
    };
  };

  res.sf.reply(err);
}
182067
func validatePayReqExpiry(payReq *zpay32.Invoice) error {
	expiry := payReq.Expiry()
	validUntil := payReq.Timestamp.Add(expiry)
	if time.Now().After(validUntil) {
		return fmt.Errorf("invoice expired. Valid until %v", validUntil)
	}

	return nil
}
133608
public function setCardExpMonth($sCardExpMonth)
    {
        //  Validate
        if (is_numeric($sCardExpMonth)) {

            $iMonth = (int) $sCardExpMonth;
            if ($iMonth < 1 || $iMonth > 12) {

                throw new ChargeRequestException(
                    '"' . $sCardExpMonth . '" is an invalid expiry month; must be in the range 1-12.',
                    1
                );

            } else {
                $this->oCard->exp->month = $iMonth < 10 ? '0' . $iMonth : (string) $iMonth;
                return $this;
            }

        } else {
            throw new ChargeRequestException(
                '"' . $sCardExpMonth . '" is an invalid expiry month; must be numeric.',
                1
            );
        }
    }
1281336
def expireat(self, key, when):
        """"""
        expire_time = datetime.fromtimestamp(when)
        key = self._encode(key)
        if key in self.redis:
            self.timeouts[key] = expire_time
            return True
        return False