This pull request introduces a maximum length restriction for the component. By setting a maximum length, we prevent users from entering excessively long and non-existent phone numbers, ensuring better data integrity and user experience. Each phone number's max length is defined inside src/data/countries.ts as length key. To give the input maxLength correctly, we are setting baselineLength which is length for flag and country code (🇦🇿 +994) and add it into the defined length.
This pull request introduces a maximum length restriction for the component. By setting a maximum length, we prevent users from entering excessively long and non-existent phone numbers, ensuring better data integrity and user experience. Each phone number's max length is defined inside
src/data/countries.ts
aslength
key. To give the inputmaxLength
correctly, we are settingbaselineLength
which is length for flag and country code (🇦🇿 +994
) and add it into the defined length.