UNPKG

@paydock/client-sdk

Version:

Paydock client sdk

45 lines 1.76 kB
/** * List of available form field validators dedicated to cards and their definition * * @const CARD_VALIDATORS * * @type {Record<string, string>} * * @param {string} CVV=cardCvvValidation * Asserts that CVV contains zero or more digits and is a number * @param {string} EXPIRY_DATE=expireDateValidation * Asserts value is a date in the future with format MM/YY * @param {string} HOLDER_NAME=cardHoldernameValidation * Asserts value is a name that respects the ITU-T T.50 standard (@see https://www.itu.int/rec/T-REC-T.50/en) * @param {string} NUMBER=cardNumberValidation Asserts the value matches a known card scheme and as a the correct length. E.g., matches a 13, 16 or 19 digit bank card, **or**, a 13 to 25 digit Vii Gift card * @param {string} PIN=cardPinValidation Asserts the value is a number with exactly 4 digits */ declare const CARD_VALIDATORS: { readonly CVV: "cardCvvValidator"; readonly EXPIRY_DATE: "expireDateValidation"; readonly HOLDER_NAME: "cardHoldernameValidator"; readonly NUMBER: "cardNumberValidator"; readonly PIN: "cardPinValidator"; }; type CardValidatorValue = typeof CARD_VALIDATORS[keyof typeof CARD_VALIDATORS]; /** * List of available generic form field validators and their definition * * @const GENERIC_VALIDATORS * * @type {Record<string, string>} * * @param {string} REQUIRED=required * Asserts the input or form field has a value defined truthy value */ declare const GENERIC_VALIDATORS: { readonly REQUIRED: "required"; }; type GenericValidatorValue = typeof GENERIC_VALIDATORS[keyof typeof GENERIC_VALIDATORS]; export type { CardValidatorValue, GenericValidatorValue }; export { CARD_VALIDATORS, GENERIC_VALIDATORS }; //# sourceMappingURL=validators.d.ts.map