mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			925 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			925 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Http\Requests\Admin;
 | |
| 
 | |
| use Illuminate\Foundation\Http\FormRequest;
 | |
| 
 | |
| class OrderAssign extends FormRequest
 | |
| {
 | |
|     /**
 | |
|      * Get the validation rules that apply to the request.
 | |
|      *
 | |
|      * @return array
 | |
|      */
 | |
|     public function rules()
 | |
|     {
 | |
|         return [
 | |
|             'plan_id' => 'required',
 | |
|             'email' => 'required',
 | |
|             'total_amount' => 'required',
 | |
|             'cycle' => 'required|in:month_price,quarter_price,half_year_price,year_price,two_year_price,three_year_price,onetime_price,reset_price'
 | |
|         ];
 | |
|     }
 | |
| 
 | |
|     public function messages()
 | |
|     {
 | |
|         return [
 | |
|             'plan_id.required' => '订阅不能为空',
 | |
|             'email.required' => '邮箱不能为空',
 | |
|             'total_amount.required' => '支付金额不能为空',
 | |
|             'cycle.required' => '订阅周期不能为空',
 | |
|             'cycle.in' => '订阅周期格式有误'
 | |
|         ];
 | |
|     }
 | |
| }
 |