Skip to content

Commit

Permalink
Using new alpha dash with spaces validation rule
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Oct 9, 2017
1 parent 86f4c03 commit c758175
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Modules/Media/Http/Requests/CreateFolderRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Modules\Media\Validators\AlphaDashWithSpaces;

class CreateFolderRequest extends FormRequest
{
Expand All @@ -13,7 +14,7 @@ public function rules()

return [
'name' => [
'alpha_dash',
new AlphaDashWithSpaces(),
'required',
Rule::unique('media__files', 'filename')->where(function ($query) use ($parentId) {
return $query->where('is_folder', 1)->where('folder_id', $parentId);
Expand Down

0 comments on commit c758175

Please sign in to comment.