forked from admin/services_core
big update base struktur tahap 1
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Auth;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class RegisterRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:100'],
|
||||
'username' => ['nullable', 'string', 'max:50', 'unique:users,username'],
|
||||
'email' => ['required', 'email', 'max:100', 'unique:users,email'],
|
||||
'whatsapp_number' => ['required', 'string', 'max:20'],
|
||||
'password' => ['required', 'string', 'min:8', 'max:100'],
|
||||
'verification_channel' => ['required', Rule::in(['email', 'whatsapp'])],
|
||||
'verification_target' => ['required', 'string', 'max:100'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Auth;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class ResendVerificationCodeRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'verification_channel' => ['required', Rule::in(['email', 'whatsapp'])],
|
||||
'verification_target' => ['required', 'string', 'max:100'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Auth;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class VerifyRegistrationRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'verification_channel' => ['required', Rule::in(['email', 'whatsapp'])],
|
||||
'verification_target' => ['required', 'string', 'max:100'],
|
||||
'verification_code' => ['required', 'digits:6'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user