Hi community,
Currently, I am in the process of configuring the component, and during testing, I've encountered a few things. I'm wondering whether I have misconfigured something, if the component handles these situations correctly or incorrectly, and if I fully understand it. I would appreciate your feedback on this.
I have currently set the component to allow the selection of only 5 countries. This works correctly. I have also translated a number of fields, which also works correctly. I have adjusted the order in which the countries are displayed, and this also works correctly.
Now I am entering various Dutch phone numbers, and I have noticed a few things:
063649 is seen as a valid number? In my opinion, this has too few digits.
06364969711 is seen as a valid number? In my opinion, this has one digit too many.
06 36496971 is seen as a valid number, and this is correct!
Could you please let me know if I am doing something wrong or if this is correct?
I can't share the .oml file, but I have attached a few screenshots of my configuration to this post.
Thank you in advance!
Bart
When you create a phone field, an input field with attribute type set to "tel" is created on the page. This semantically informs the browser and assistive technologies that the input field is intended for a telephone number. There is no strict validation, no specific syntax for phone numbers is enforced, as phone number formats vary widely across regions.
Basically, you will need to create custom validation for the phone field if you need a particular format.
Hi @Sebastian Marten,
Thank you for your reply!
I thought this component could handle these validations for me. I want to know if I misunderstood this, or if I am not using the component correctly.
Best regards,
You misunderstood the component I believe.
As I tried to explain above, a phone field is simply rendered as a HTML 5 input field semantically marked as containing a phone number. There is no specific validation, but you can easily write validation yourself.
Thank you for clarifying!
You're welcome, glad I could help.