['required', 'string', 'max:255'], 'description' => ['nullable', 'string'], 'date_create' => ['nullable'], 'status' => ['nullable', 'boolean'], 'type' => ['nullable', 'in:vnnic_06,vnnic_07'], ]; } public function messages(): array { return [ 'term_name.required' => 'Tên đợt khai báo là bắt buộc', ]; } public function toDTO(int $userId): DomainFluctuationTermDTO { return DomainFluctuationTermDTO::fromArray(array_merge( $this->validated(), ['user_id' => $userId] )); } }