ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
regex方法使用正则来验证数据是否正确。 格式: ~~~ regex(值, 正则规则) ~~~ 用法: ~~~ Validator::regex(12306, '/^\d+$/'); // true Validator::regex(12306, '/^\d{1,4}$/'); // false ~~~