Files
cesizen-individuel/backend/app/Http/Requests/StoreSaisieRequest.php
T
Azmog bfd35905c9 feat: add mobile application structure with emotion picker and API integration
- Added favicon and icon assets for the mobile app.
- Implemented EmotionPicker component for selecting emotions with child options.
- Created hooks for fetching emotions, feeds, and rapport data.
- Established API service for handling requests and authentication.
- Integrated Zustand for state management of user authentication.
- Defined color palette for the application.
- Set up TypeScript types for various entities including User, Emotion, and Feed.
- Configured Babel and TypeScript for the mobile project.
- Added package.json with necessary dependencies for Expo and React Native.
2026-04-15 16:09:20 +02:00

35 lines
936 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreSaisieRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'emotion_id' => 'required|exists:emotions,id',
'intensite' => 'required|integer|between:1,10',
'note' => 'nullable|string|max:2000',
'date_saisie' => 'required|date_format:Y-m-d',
];
}
public function messages(): array
{
return [
'emotion_id.required' => 'L\'émotion est obligatoire.',
'emotion_id.exists' => 'Cette émotion n\'existe pas.',
'intensite.required' => 'L\'intensité est obligatoire.',
'intensite.between' => 'L\'intensité doit être entre 1 et 10.',
'date_saisie.required' => 'La date est obligatoire.',
];
}
}