<?php

namespace App\Http\Requests\Api\SeminarSignUp;

use Illuminate\Foundation\Http\FormRequest;

class StoreRequest extends FormRequest
{
    public function rules(): array
    {
        // $name, $email, $mobile, $trackId
        return [
            'name'   => 'required',
            'email' => 'required|email',
            'mobile' => 'required',
            'trackId' => 'required'
        ];
    }

    public function messages(): array
    {
        return [
            'name.required'     => 'column [name] is required.',
            'email.required' => 'column [email] is required.',
            'mobile.required'  => 'column [mobile] is required.',
            'email.email'   => 'column [email] format error',
            'trackId.required'  => 'column [trackId] is required.',
        ];
    }
}

?>