JS 中文邮箱正则判断

发布时间:2022-04-19浏览次数:0

支持注册ChatGPT Plus的OneKey虚拟卡
绑定Apple Pay、Google Pay、支付宝和微信支付进行日常消费

注册和了解更多 ->

silver
/**
 * https://github.com/any86/any-rule
 * @see https://github.com/any86/any-rule/blob/master/packages/www/src/RULES.js
 * @author any86
 */

/**
 * 非负整数
 *
 * @example
 * 1231,123
 */
export const NonNegativeInteger = /^[1-9]\d*|0$/

/**
 * 整数
 */
export const Integer = /^-?[0-9]\d*$/

/**
 * 浮点数
 *
 * @example
 * 1.5
 */
export const RegExpFloatNumber = /^(-?\d+)(\.\d+)?$/
/**
 * email(支持中文邮箱)
 * @example
 * '[email protected]', '[email protected]', '啦啦啦@126.com'
 */
export const RegExpEmail
  = /^[A-Za-z0-9\u4E00-\u9FA5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/

字节笔记本扫描二维码查看更多内容