|
|
@@ -75,9 +75,9 @@ class Keyboard extends Controller
|
|
|
$id = request()->input('id');
|
|
|
$validator = [
|
|
|
'id' => ['required', 'integer'],
|
|
|
- 'reply' => 'required|string',
|
|
|
- 'explain' => 'nullable|string',
|
|
|
- 'language' => 'required|string',
|
|
|
+ 'reply' => ['required', 'string'],
|
|
|
+ 'explain' => ['nullable', 'string', 'max:28'],
|
|
|
+ 'language' => ['required', 'string', 'in:zh,vi,en'],
|
|
|
'image' => ['nullable', 'url'],
|
|
|
'button' => ['nullable', 'string', 'max:100'],
|
|
|
'buttons' => ['array'],
|