mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 05:13:37 +08:00
Basic validation for tags slugs (#150)
* Co-authored-by <sychocouldy@gmail.com>
This commit is contained in:
parent
cabe25acb4
commit
c1069ff035
|
@ -18,7 +18,7 @@ class TagValidator extends AbstractValidator
|
|||
*/
|
||||
protected $rules = [
|
||||
'name' => ['required'],
|
||||
'slug' => ['required', 'unique:tags'],
|
||||
'slug' => ['required', 'unique:tags', 'regex:/^[^\/\\ ]*$/i'],
|
||||
'is_hidden' => ['bool'],
|
||||
'description' => ['string', 'max:700'],
|
||||
'color' => ['regex:/^#([a-f0-9]{6}|[a-f0-9]{3})$/i'],
|
||||
|
|
Loading…
Reference in New Issue
Block a user