Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
<?php
declare(strict_types=1);
namespace HiEvents\Http\Request\Order;
use HiEvents\Http\Request\BaseRequest;
use HiEvents\Validators\CompleteOrderValidator;
use HiEvents\Validators\Rules\PersonNameRule;
class CompleteOrderRequest extends BaseRequest
{
public function rules(): array
{
if ($this->route() === null) {
return [
'order.first_name' => ['required', 'string', 'max:40', new PersonNameRule],
'order.last_name' => ['required', 'string', 'max:40', new PersonNameRule],
'order.email' => ['required', 'email'],
'order.email_confirmation' => ['required', 'email', 'same:order.email'],
'order.questions' => ['array'],
'order.address' => ['array'],
'order.address.address_line_1' => ['nullable', 'string', 'max:255'],
'order.address.address_line_2' => ['nullable', 'string', 'max:255'],
'order.address.city' => ['nullable', 'string', 'max:85'],
'order.address.state_or_region' => ['nullable', 'string', 'max:85'],
'order.address.zip_or_postal_code' => ['nullable', 'string', 'max:85'],
'order.address.country' => ['nullable', 'string', 'max:2'],
'products' => ['array'],
'products.*.seat_uid' => ['nullable', 'string', 'max:24'],
];
}
return app(CompleteOrderValidator::class)->rules();
}
public function messages(): array
{
return app(CompleteOrderValidator::class)->messages();
}
}