LearnNewsExamplesServices
Frontmatter
id4386
titleform.field.Phone: inputPattern edge cases
stateClosed
labels
enhancementstale
assignees[]
createdAtMay 4, 2023, 9:44 PM
updatedAtSep 12, 2024, 4:29 AM
githubUrlhttps://github.com/neomjs/neo/issues/4386
authortobiu
commentsCount4
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtSep 12, 2024, 4:29 AM

form.field.Phone: inputPattern edge cases

Closed v8.1.0 enhancementstale
tobiu
tobiu commented on May 4, 2023, 9:44 PM

@ki1pen @deniztoprak

the new inputPattern regex does not support the following format: +49 (151) 1234 567

so we should polish it more. open for ideas :)

tobiu added the enhancement label on May 4, 2023, 9:44 PM
ki1pen
ki1pen May 5, 2023, 3:45 PM

@tobiu Does it need to accept something like this? +(123) (123) 456-7-890 (+123) 456 789 +(12-3) 456 789 +123 456 (789)

deniztoprak
deniztoprak May 7, 2023, 11:07 PM

It's hard to find one-size-fits-all pattern to validate tel inputs. There are some good insights here:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel#validation

There are people arguing that phone number validation is useless:

https://stackoverflow.com/questions/14639973/javascript-regex-what-to-use-to-validate-a-phone-number/21117154#21117154

And some specialized libraries which can inspire:

https://github.com/google/libphonenumber

@github-actions - 2024-08-29T02:27:25Z

This issue is stale because it has been open for 90 days with no activity.

  • 2024-08-29T02:27:25Z @github-actions added the stale label

@github-actions - 2024-09-12T02:29:19Z

This issue was closed because it has been inactive for 14 days since being marked as stale.

  • 2024-09-12T02:29:19Z @github-actions closed this issue