This is one of those things I would love to do myself, but I simply have no time to pursue it. So I thought that I would throw this package idea out in the community, and hope someone with better time would want to make it.
Phone number validation.
I work at a company with about 50.000 daily customers hitting our Elm based frontend. When purchasing a train ticket (which is the service we provide) the user is allowed to pay using their phone, or receive a copy of a receipt on their phone. For this, we need to validate their phone number.
I might have some time tomorrow. Can you tell me more about the exact features you require? libphonenumber is huge; it might make sense to focus the Elm app, to only be able to validate if a number might be a phone number or not. (And keep the formatting, geolocation, etc. for other packages)
If I remember correctly from scanning through libphonenumber, it has all required definitions in a .xml file. Maybe one could write a script that generates a .elm file from that .xml, and use that as a basis for other packages.
Kind of like justinmimbs/timezone-data provides time zone information for elm/time.
We use is for SSN, Phone and Currency. Note the we just use cleave for input re-formatting, not actual validation (but it does act as a validator in that, for example, it will not allow non-numeric characters in the input.)
Part of the reason we haven’t moved to Elm 0.19 is we are using a native module for this. (I’m sure we could move this to ports, not trying to open up that conversation…) but would love an Elm native form input formatter!
While you wait, this is purportedly smaller and is one I used through a port recently: https://www.npmjs.com/package/awesome-phonenumber
Would also love to see an elm package version appear and then could knock out some unwelcome JS from the app.