-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Validation for Phone Numbers from Denmark, Germany, and Greenland
- Adjusted the input type to 'tel' to enhance phone number input handling. - Introduced new properties to `TextInput` to facilitate the validation of phone numbers, with specific enhancements: - `pattern`: A regex implemented to match phone numbers originating from Denmark, Germany, and Greenland. - `title`: used to display an error message in most browsers when the input does not adhere to the specified pattern. - Employed the same text for the `placeholder` as the error message to inform users about the accepted phone number formats. pattern: * (\+45|0045)[0-9]{8}: Matches a Denmark phone number: country code +45, followed by 8 digits. * (\+49|0049)[0-9]{7,11}: Matches a German phone number: country code +49, followed by between 7 and 11 digits. * (\+299|00299)[0-9]{6}: Matches a Greenland phone number: country code +299, followed by 6 digits.
- Loading branch information
1 parent
20416d2
commit 700648b
Showing
4 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters