https://segmentfault.com/a/1190000014366951
let regTwo = /^(?=.*?[a-zA-Z])(?=.*?[0-9])[a-zA-Z0-9]{6,15}$/ //6~15位英文+数字
let regOne = /^\d{6}$/ //6位纯数字
if (regOne.test(this.inputPassword) || regTwo.test(this.inputPassword))
package.json中库的版本号详解(^和~区别) ps:例子以区间表示如下
~1.15.2 : [1.15.2,1.16.0)
^3.3.4 : [3.3.4 ,4.0.0)