feature: Allow IsMobilePhone
Decorator to Accept Multiple Locales
#2489
Labels
flag: needs discussion
Issues which needs discussion before implementation.
type: feature
Issues related to new features.
Description
I'm currently using the validation decorators in my NestJS DTOs. However, I'm encountering limitations with the
IsMobilePhone
decorator, as it only accepts a single locale. This issue persists with "class-validator": "^0.14.1".For example:
Proposed Solution
The
IsMobilePhone
decorator should be enhanced to accept multiple locales. This would allow for validation against phone numbers from multiple regions. For instance:This enhancement would significantly improve the flexibility and usability of the
IsMobilePhone
decorator.The text was updated successfully, but these errors were encountered: