yii2 使用
核心验证器,字符串限制
1 | [['phone'], 'string', 'length' => [11, 11], 'tooShort' => '请输入11位手机号码', 'tooLong' => '请输入11位手机号码'], |
响应json数据
- 在
web.php中配置components
1 | 'response' => [ |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
1 | [['phone'], 'string', 'length' => [11, 11], 'tooShort' => '请输入11位手机号码', 'tooLong' => '请输入11位手机号码'], |
web.php中配置components1 | 'response' => [ |