class-validator icon indicating copy to clipboard operation
class-validator copied to clipboard

change(isMobilePhone): updated locale typing to better reflect ValidatorJS functionality

Open kurbar opened this issue 8 months ago • 0 comments

Description

Updated typings for IsMobilePhone decorator usage to better reflect of the actual functionality of ValidatorJS's validation.

Notable changes:

  • support setting locale as "any" to validate against any locale.
  • allow locale to be an array of locales to validate against multiple locales.

Checklist

  • [X] the pull request title describes what this PR does (not a vague title like Update index.md)
  • [X] the pull request targets the default branch of the repository (develop)
  • [X] the code follows the established code style of the repository
    • npm run prettier:check passes
    • npm run lint:check passes
  • [X] tests are added for the changes I made (if any source code was modified)
  • [X] documentation added or updated
  • [X] I have run the project locally and verified that there are no errors

Fixes

fixes #2489

kurbar avatar Jun 18 '24 10:06 kurbar