InvestValidator.php 829 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Validators;
  3. use \Prettus\Validator\Contracts\ValidatorInterface;
  4. use \Prettus\Validator\LaravelValidator;
  5. /**
  6. * Class InvestValidator.
  7. *
  8. * @package namespace App\Validators;
  9. */
  10. class InvestValidator extends LaravelValidator
  11. {
  12. /**
  13. * Validation Rules
  14. *
  15. * @var array
  16. */
  17. protected $rules = [
  18. ValidatorInterface::RULE_CREATE => [
  19. 'title' => 'required',
  20. 'invest_money' => 'required|min:0.1',
  21. ],
  22. ValidatorInterface::RULE_UPDATE => [
  23. 'title' => 'required',
  24. 'invest_money' => 'required|min:0.1',
  25. ],
  26. ];
  27. protected $messages=[
  28. 'title.required'=>'请输入投资名称',
  29. 'invest_money.required'=>'请输入投入金额',
  30. 'invest_money.min'=>'投入金额最小0.1',
  31. ];
  32. }