shinyvalidate icon indicating copy to clipboard operation
shinyvalidate copied to clipboard

sv_functions I want

Open akgold opened this issue 3 years ago • 4 comments

If these were added, I think it'd cover a large proportion of use cases.

Standard regexs for email + phone Checks for non-negative and strictly positive numbers

akgold avatar Sep 02 '20 18:09 akgold

URLs (http and https) too, maybe.

Phone numbers are complicated if you want to support multiple locales but looks like there's a dialr package which wraps Google's libphonenumber, looks promising.

jcheng5 avatar Oct 07 '20 23:10 jcheng5

I had a look at dialr but there is a dependency on rJava which I think is undesirable. I was hoping to find an R port of libphonenumber-js but that is not a thing.

rich-iannone avatar Feb 03 '21 15:02 rich-iannone

IPs would be great. Something like: https://rdrr.io/cran/iptools/src/R/is.R and valid filenames (e.g. for Windows) would be helpful.

ismirsehregal avatar Jun 23 '21 11:06 ismirsehregal

Full phone number validation isn't really feasible just because of the workload. Every country has their own formatting and often also legacy numbers that don't follow the current rules. The closest you could get I think would be requiring numbers start with a +, a recognized country code, and a fairly generous minimum and maximum length. Something like 5-15 digits inclusive of the country code (but not the leading +).

D3SL avatar May 08 '22 04:05 D3SL