manager icon indicating copy to clipboard operation
manager copied to clipboard

refactor: N/A - Infer type for `value` to `number` in `expiry_year` validation

Open h3ssan opened this issue 1 year ago โ€ข 0 comments

Description ๐Ÿ“

In the CreditCardSchema validation, the expiry_year field has a test to ensure the expiration year is 2 or 4 digits. The test function takes a value parameter, which is inferred to be a number type.

Changes ๐Ÿ”„

  • Modified file: packages/validation/src/account.schema.ts
  • Change the parameter from value with no type, into value: number.

Target release date ๐Ÿ—“๏ธ

It's just a refactor, not critical.

Preview ๐Ÿ“ท

Before After

How to test ๐Ÿงช

Prerequisites

(How to setup test environment)

  • ...
  • ...

Reproduction steps

(How to reproduce the issue, if applicable)

  • ...
  • ...

Verification steps

(How to verify changes)

  • ...
  • ...

As an Author I have considered ๐Ÿค”

Check all that apply

  • [X] ๐Ÿ‘€ Doing a self review
  • [X] โ” Our contribution guidelines
  • [X] ๐Ÿค Splitting feature into small PRs
  • [ ] โž• Adding a changeset
  • [ ] ๐Ÿงช Providing/Improving test coverage
  • [ ] ๐Ÿ” Removing all sensitive information from the code and PR description
  • [ ] ๐Ÿšฉ Using a feature flag to protect the release
  • [ ] ๐Ÿ‘ฃ Providing comprehensive reproduction steps
  • [ ] ๐Ÿ“‘ Providing or updating our documentation
  • [ ] ๐Ÿ•› Scheduling a pair reviewing session
  • [ ] ๐Ÿ“ฑ Providing mobile support
  • [ ] โ™ฟ Providing accessibility support

h3ssan avatar Aug 27 '24 22:08 h3ssan