fix validation

This commit is contained in:
shibafu 2020-07-21 22:55:11 +09:00
parent e6252c49d1
commit ab960cda7c
1 changed files with 2 additions and 2 deletions

View File

@ -32,11 +32,11 @@ class WebhookController extends Controller
'note' => 'nullable|string|max:500',
'link' => 'nullable|url|max:2000',
'tags' => 'nullable|array',
'tags.*' => ['string', 'not_regex:/\s/u'],
'tags.*' => ['string', 'not_regex:/[\s\r\n]/u', 'max:255'],
'is_private' => 'nullable|boolean',
'is_too_sensitive' => 'nullable|boolean',
], [
'tags.*.not_regex' => 'The :attribute cannot contain spaces.'
'tags.*.not_regex' => 'The :attribute cannot contain spaces, tabs and newlines.'
]);
if ($validator->fails()) {