yii2-netdisk/models/RenameForm.php

20 lines
369 B
PHP
Raw Normal View History

2024-02-11 16:02:37 +08:00
<?php
namespace app\models;
use yii\base\Model;
class RenameForm extends Model
{
public $newName;
public function rules()
{
return [
['newName', 'required'],
['newName', 'string', 'max' => 255],
['newName', 'match', 'pattern' => '/^[^\/:*?"<>|\\\\]+$/', 'message' => 'Invalid file name.'],
];
}
}