前端验证集合

杭州蘇小小 2020-11-12 13:44:22
前端 集合 验证 SegmentFault


s-verify

介绍

前端集合

安装

yarn add s-verify --save
# OR
npm install s-verify --save

使用

引用

import { sIDCard } from "s-verify";

调用

sIDCard("string",Boolean)

参数

方法名称 调用名称 说明 参数
企业统一社会信用代码 isEnterpriseCreditCode 验证“企业统一社会信用代码” 验证值(String)
身份证号 isIDCard 严格验证身份证号&返回身份信息 验证值(String), 是否验证(Boolean)
邮箱 isEmail 严格邮箱 验证值(String)
电话号 isTel 验证电话号码 验证值(String,Number)
手机号 isPhone 验证手机号码 验证值(String,Number)
严格密码 isStrictPassword 密码以字母开头,长度在6~18之间,只能包含字母、数字和下划线 验证值(String)
邮政编码 isPostal 验证邮政编码 验证值(String)
日期时间 isDate 验证日期时间 验证值(String)
英文 isEnglish 验证英文 验证值(String)
中文 isChinese 验证中文 验证值(String)
小写 isLower 验证小写 验证值(String)
大写 isUpper 验证大写 验证值(String)
网址 isUrl 验证网址 验证值(String)
字符串 isString 验证字符串 验证值(*)
数字 isNumber 验证数字 验证值(*)
布尔 isBoolean 验证布尔 验证值(*)
函数 isFunction 验证函数 验证值(*)
null isNull 验证null 验证值(*)
undefined isUndefined 验证undefined 验证值(*)
object isObject 验证Object 验证值(*)
array isArray 验证Array 验证值(*)
Symbol函数 isSymbol 验证Symbol函数 验证值(*)
Promise对象 isPromise 验证Promise对象 验证值(*)
Set对象 isSet 验证Set对象 验证值(*)
微信浏览器 isWeiXin 验证是否是微信浏览器 -
移动端 isDeviceMobile 验证是否是移动端 -
QQ浏览器 isQQBrowser 验证是否是QQ浏览器 -
爬虫 isSpider 验证是否是爬虫 -
Ios isIos 验证是否是Ios系统 -
Pc isPC 验证是否是Pc端 -
版权声明
本文为[杭州蘇小小]所创,转载请带上原文链接,感谢
https://segmentfault.com/a/1190000038144743

  1. css单位
  2. CSS unit
  3. Front end validation collection
  4. Front end learning (4) -- response line, response head, response body
  5. Lesson 27: using time measuring tools to explore available spare time
  6. CSS 单位
  7. CSS unit
  8. 前端工具集合
  9. Front end Tools Collection
  10. Introduction to HTTP message format
  11. Introduction to new features of HTML5
  12. Common instructions for Vue
  13. Introduction of bootstrap Blazer component library
  14. HTML5 速览
  15. HTML5 quick view
  16. HTML表格自动排序
  17. For less than $1700, create a private cloud with openstack
  18. Basic learning of JavaScript (1)
  19. 前端编程之路一一HTML标签分类
  20. Front end Programming: HTML tag classification
  21. ColSpan and rowspan merging cells of HTML form elements
  22. JavaScript 日期时间格式化
  23. JavaScript date time formatting
  24. Classification of front end interview questions - html2
  25. CSS block elements
  26. HTML5 form detailed tutorial
  27. HTML5 form detailed tutorial
  28. HTML5新增的元素表
  29. New element table in HTML5
  30. 3D轮播插件vue-carousel-3d非官方最全文档
  31. 3D carousel plug-in vue-carousel-3d
  32. Uniapp (Vue general) integrates Tencent location service SDK -- multi platform small program general
  33. Slowhttptest slow attack tool use details
  34. HTML summary (2)
  35. Overview of CSS3
  36. Front end abnormal monitoring system
  37. 免费网站部署和免费数据库Serverless云存储资源汇总整理
  38. Free website deployment and collection of free database serverless cloud storage resources
  39. Vux form -- a form solution of base vux
  40. 可以直接用于HTML中的特殊字符表 unicode字符集
  41. Can be directly used in HTML special character table Unicode character set
  42. Detailed explanation of HTTP protocol
  43. HTTP request header and request response header
  44. CSS background深度解析
  45. Python web/HTML GUI
  46. Front end standard 2: HTML you know and don't know
  47. Some HTML tags
  48. HTML标签之table
  49. Table of HTML tag
  50. DataTables of jQuery plug-in
  51. Unity calls Google's free translation API (HTTPS interface). Young people don't speak martial arts. How can they speak in multiple languages
  52. Linux entry most commonly used commands, do not learn a bunch of useless commands
  53. Piziheng embedded: a list of common short-range wireless communication protocols (Wi Fi / Bluetooth / ZigBee / thread...)
  54. Naming rules for the front end team of ladder
  55. HTML logo related symbols
  56. Node . JS: development resources and technology stack arrangement
  57. Unity calls Google's free translation API (HTTPS interface). Young people don't speak martial arts. How can they speak in multiple languages
  58. Straighten out JavaScript (18) - statements and operators
  59. Employment information statistics network (interface document)
  60. css selector