正则验证0-100的正整数 2020-03-23 本文已影响0人 yuki20 /** * 验证0-100之间的正整数 */ export function isZeroToHundred(str) { return /^[1-9][0-9]?$/.test(str) }