You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a phone number to the text field, including the country code (e.g., +1 12345678901234567890).
Observe that the strict mode validation fails to enforce the number length.
Expected Behavior
Strict mode should validate the phone number properly, even when a country code is present in the field. The length and type of the number should adhere to the validationNumberTypes configuration.
Actual Behavior
When a country code is included in the field, the number length appears to be unlimited, and strict mode validation does not work as expected.
Initialization Options
The following options are used for initialization:
validationNumberTypes: null,strictMode: true,
Additional Notes
It seems that the country code is not being correctly factored into the validation logic when strictMode is enabled.
The expected behavior should validate the full number, including the country code.
Proposed solution
After looking at the code I think we can get the number ignoring the country code and check if it's within the length and stop user from entering more number. #1932
The text was updated successfully, but these errors were encountered:
creador-dev
changed the title
[BUG] Strict Mode Doesn't Work When Country Code is in the Field
[BUG] Strict mode validation length doesn't works when country code is in the field
Jan 15, 2025
Plugin Version
v25.2.1
Steps to Reproduce
+1 12345678901234567890
).Expected Behavior
Strict mode should validate the phone number properly, even when a country code is present in the field. The length and type of the number should adhere to the
validationNumberTypes
configuration.Actual Behavior
When a country code is included in the field, the number length appears to be unlimited, and strict mode validation does not work as expected.
Initialization Options
The following options are used for initialization:
Additional Notes
strictMode
is enabled.Proposed solution
After looking at the code I think we can get the number ignoring the country code and check if it's within the length and stop user from entering more number.
#1932
The text was updated successfully, but these errors were encountered: