文件名称:yup-phone::telephone_selector:使用google-libphonenumber向yup验证器添加电话号码验证检查
文件大小:816KB
文件格式:ZIP
更新时间:2024-02-24 05:55:49
google validation google-libphonenumber phone number
电话 使用向yup验证器添加电话号码验证检查,从而提供准确的验证检查。 在这里阅读更多关于核心库的信息 。 安装 # npm install --save yup-phone $ yarn add yup-phone 例子 // See https://repl.it/repls/WiryCleverPatches import * as Yup from "yup" ; // const Yup = require("yup"); import "yup-phone" ; // require("yup-phone"); // validate any phone number (defaults to India for country) const phoneSchema = Yup . string ( ) . phone ( ) . required ( ) ; ( async ( ) => { console . log ( await phoneSchema . isValid ( "9876543210" ) ) ; // → true } ) ( ) ;
【文件预览】:
yup-phone-master
----.travis.yml(1KB)
----.releaserc.json(432B)
----.babelrc(332B)
----.deepsource.toml(364B)
----rollup.config.js(2KB)
----docs()
--------_config.yml(26B)
--------CNAME(16B)
--------index.md(6KB)
----package.json(7KB)
----tslint.json(111B)
----jest.config.js(6KB)
----LICENSE(1KB)
----example.js(246B)
----dist()
--------yup-phone.umd.js.map(1.38MB)
--------yup-phone.umd.d.ts(535B)
--------yup-phone.umd.min.js(504KB)
--------yup-phone.esm.js(5KB)
--------yup-phone.cjs.js.map(3KB)
--------yup-phone.umd.min.js.map(726KB)
--------yup-phone.cjs.js(987B)
--------yup-phone.cjs.d.ts(535B)
--------yup-phone.esm.d.ts(535B)
--------yup-phone.umd.js(530KB)
--------yup-phone.umd.min.d.ts(535B)
----src()
--------yup-phone.ts(2KB)
--------yup-phone.test.ts(6KB)
--------index.ts(29B)
----.npmignore(2KB)
----tsconfig.json(354B)
----.gitignore(4KB)
----commitlint.config.js(252B)
----.npmrc(41B)
----README.md(6KB)
----yarn.lock(452KB)
----git_deploy_key.enc(3KB)
----.vscode()
--------launch.json(699B)