feat: simplify phone number validation by removing unnecessary digit constraints
This commit is contained in:
parent
1df5b53910
commit
8de53eadde
@ -31,7 +31,7 @@ public function rules(): array
|
||||
Rule::unique('users', 'username')->ignore($userId, 'id'),
|
||||
],
|
||||
'full_name' => ['required', 'string', 'max:200'],
|
||||
'phone_number' => ['nullable', 'string', 'max:20', 'digits_between:1,20'],
|
||||
'phone_number' => ['nullable', 'string', 'max:20'],
|
||||
'gender' => ['nullable', 'in:male,female'],
|
||||
'birth_date' => ['nullable', 'date'],
|
||||
'address' => ['nullable', 'string'],
|
||||
|
||||
@ -18,7 +18,7 @@ public function rules(): array
|
||||
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:200', Rule::unique('customers', 'name')->ignore($customer)],
|
||||
'phone_number' => ['nullable', 'string', 'max:20', 'digits_between:1,20'],
|
||||
'phone_number' => ['nullable', 'string', 'max:20'],
|
||||
'address' => ['nullable', 'string'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ public function rules(): array
|
||||
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:200', Rule::unique('suppliers', 'name')->ignore($supplier)],
|
||||
'phone_number' => ['nullable', 'string', 'max:20', 'digits_between:1,20'],
|
||||
'phone_number' => ['nullable', 'string', 'max:20'],
|
||||
'address' => ['nullable', 'string'],
|
||||
];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user