PHP code example of yesccx / think-validate

1. Go to this page and download the library: Download yesccx/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/ */

    

yesccx / think-validate example snippets


app/config/autoload/think-validate.php

return [
    // 验证器异常类,如果为空则表示不抛出异常(这时需要获取错误信息进行处理)
    'validate_exception' => AppException::class,
];


class UserValidate extends Yesccx\ThinkValidate\Validate {
    ...
}

$uv = new UserValidate 或 $uv = UserValidate::make();
$uv->xxxx
shell
php bin/hyperf.php think-validate:publish --config