src/Commands/Stubs/Backend/Inventory/Opname/Requests/StoreRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'company_id' => 'required|exists:__defaultNamespace__\Models\Related\MCompany,id',
            'warehouse_id' => 'required|exists:__defaultNamespace__\Models\Related\MWarehouse,id',
            'number' => 'nullable|unique:__defaultNamespace__\Models\Opname,number',
            'list_item_id' => 'required|array',
            'list_item_id.*' => 'exists:__defaultNamespace__\Models\Related\MItem,id',
            'list_expired_date' => 'nullable|array',
            'list_expired_date.*' => 'date_format:Y-m-d',
            'list_old_qty' => 'required|array',
            'list_new_qty' => 'required|array',
            'list_unit_price' => 'required|array',
            'list_note' => 'nullable|array',
        ];
    }
public function rules ( ) { return [ 'company_id' => 'required|exists:__defaultNamespace__\Models\Related\MCompany,id' , 'warehouse_id' => 'required|exists:__defaultNamespace__\Models\Related\MWarehouse,id' , 'number' => 'nullable|unique:__defaultNamespace__\Models\Opname,number' , 'list_item_id' => 'required|array' , 'list_item_id.*' => 'exists:__defaultNamespace__\Models\Related\MItem,id' , 'list_expired_date' => 'nullable|array' , 'list_expired_date.*' => 'date_format:Y-m-d' , 'list_old_qty' => 'required|array' , 'list_new_qty' => 'required|array' , 'list_unit_price' => 'required|array' , 'list_note' => 'nullable|array' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .