PlanUpdate.php 548 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Requests\Admin;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class PlanUpdate extends FormRequest
  5. {
  6. /**
  7. * Get the validation rules that apply to the request.
  8. *
  9. * @return array
  10. */
  11. public function rules()
  12. {
  13. return [
  14. 'show' => 'in:0,1',
  15. 'renew' => 'in:0,1'
  16. ];
  17. }
  18. public function messages()
  19. {
  20. return [
  21. 'show.in' => '销售状态格式不正确',
  22. 'renew.in' => '续费状态格式不正确'
  23. ];
  24. }
  25. }