bfd35905c9
- 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.
35 lines
936 B
PHP
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.',
|
|
];
|
|
}
|
|
}
|