class-validator
class-validator copied to clipboard
change(isMobilePhone): updated locale typing to better reflect ValidatorJS functionality
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