PHP code example of saithink / think-validate
1. Go to this page and download the library: Download saithink/think-validate library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
saithink / think-validate example snippets
namespace app\index\validate;
use think\Validate;
class User extends Validate
{
protected $rule = [
'name' => 'ame.tween' => '年龄只能在1-120之间',
'email' => '邮箱格式错误',
];