['required', 'integer', 'in:' . implode(',', [ WithdrawAuditStatus::APPROVED->value, WithdrawAuditStatus::REJECTED->value, ])], 'remark' => ['nullable', 'string', 'max:255'], ]; } /** * Get custom messages for validator errors. * * @return array */ public function messages(): array { return [ 'status.required' => '请选择审核状态', 'status.integer' => '审核状态格式错误', 'status.in' => '审核状态无效', 'remark.string' => '审核备注必须是字符串', 'remark.max' => '审核备注不能超过255个字符', ]; } }