1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Validators;
- use \Prettus\Validator\Contracts\ValidatorInterface;
- use \Prettus\Validator\LaravelValidator;
- /**
- * Class InvestValidator.
- *
- * @package namespace App\Validators;
- */
- class InvestValidator extends LaravelValidator
- {
- /**
- * Validation Rules
- *
- * @var array
- */
- protected $rules = [
- ValidatorInterface::RULE_CREATE => [
- 'title' => 'required',
- 'invest_money' => 'required|min:0.1',
- ],
- ValidatorInterface::RULE_UPDATE => [
- 'title' => 'required',
- 'invest_money' => 'required|min:0.1',
- ],
- ];
- protected $messages=[
- 'title.required'=>'请输入投资名称',
- 'invest_money.required'=>'请输入投入金额',
- 'invest_money.min'=>'投入金额最小0.1',
- ];
- }
|