Changeset d795fa6 for app/Http/Requests


Ignore:
Timestamp:
10/17/21 18:39:50 (3 years ago)
Author:
Berat Kjufliju <kufliju@…>
Branches:
develop, master
Children:
bd9e8e3
Parents:
120759b
Message:

added validation to blades

Location:
app/Http/Requests/Dashboard
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Requests/Dashboard/DocumentRequest.php

    r120759b rd795fa6  
    44
    55use App\Models\Document;
     6use App\Models\FileType;
    67use Illuminate\Foundation\Http\FormRequest;
    78
     
    3031    public function rules()
    3132    {
     33
    3234        $rules = [
    3335            "arch_id" => "required|min:10|max:255",
     
    4042            $fileRules = [
    4143                "file_item.*" => "mimes:jpg,jpeg,png|max:4096"
    42             ];
     44                ];
    4345        } else {
    4446            $fileRules = [
  • app/Http/Requests/Dashboard/EmailSettingsRequest.php

    r120759b rd795fa6  
    2525    {
    2626        return [
    27             "email" => "required|string|email|max:255|unique:users,email,$this->id,id",
     27            "email" => "required|string|email|max:50|unique:users,email,$this->id,id",
    2828        ];
    2929    }
  • app/Http/Requests/Dashboard/NewDepartmentRequest.php

    r120759b rd795fa6  
    2525    {
    2626        return [
    27         "name" => "required|min:2|max:25|unique:departments,name",
     27        "name" => "required|min:2|max:30|unique:departments,name",
    2828        "code" => "required|min:2|max:10|unique:departments,code"
    2929        ];
  • app/Http/Requests/Dashboard/NewUserRequest.php

    r120759b rd795fa6  
    2525    {
    2626        return [
    27             "name" => "required|alpha|min:2|max:255",
    28             "surname" => "required|alpha|min:2|max:255",
    29             "mobile_number" => "required|unique:users,mobile_number",
    30             "email" => "required|string|email|max:255|unique:users,email",
    31             "username" => "required|min:8|unique:users,username",
     27            "name" => "required|alpha|min:2|max:30",
     28            "surname" => "required|alpha|min:2|max:30",
     29            "phone_number" => "required|unique:users,phone_number",
     30            "email" => "required|string|email|max:50|unique:users,email",
     31            "username" => "required|min:5|max:30|unique:users,username",
    3232            "userRole" => "required|exists:roles,id",
    3333            "avatar" => "mimes:jpeg,png,gif|max:5000",
  • app/Http/Requests/Dashboard/PasswordSettingsRequest.php

    r120759b rd795fa6  
    3434                }
    3535            ],
    36             "password" => "required|string|confirmed|min:8",
     36            "password" => "required|string|confirmed|min:6",
    3737        ];
    3838    }
  • app/Http/Requests/Dashboard/UpdateDepartmentRequest.php

    r120759b rd795fa6  
    2525    {
    2626        return [
    27             "name" => "required|min:2|max:25|unique:departments,name,$this->id,id",
    28             "code" => "required|min:2|max:10|unique:departments,code,$this->id,id"
     27            "name" => "required|min:2|max:30|unique:departments,name,$this->id,id",
     28            "code" => "required|min:2|max:30|unique:departments,code,$this->id,id"
    2929        ];
    3030    }
  • app/Http/Requests/Dashboard/UpdateUserData.php

    r120759b rd795fa6  
    2525    {
    2626        return [
    27             "name" => "required|alpha|min:2|max:255",
    28             "surname" => "required|alpha|min:2|max:255",
    29             "mobile_number" => "required|unique:users,mobile_number,$this->id,id",
     27            "name" => "required|alpha|min:2|max:30",
     28            "surname" => "required|alpha|min:2|max:30",
     29            "phone_number" => "required|unique:users,phone_number,$this->id,id",
    3030            "avatar" => "mimes:jpeg,png,gif|max:5000",
    3131        ];
  • app/Http/Requests/Dashboard/UpdateUserRequest.php

    r120759b rd795fa6  
    2525    {
    2626        return [
    27             "name" => "required|alpha|min:2|max:255",
    28             "surname" => "required|alpha|min:2|max:255",
    29             "mobile_number" => "required|unique:users,mobile_number,$this->id,id",
    30             "email" => "required|string|email|max:255|unique:users,email,$this->id,id",
    31             "username" => "required|min:8|unique:users,username,$this->id,id",
     27            "name" => "required|alpha|min:2|max:30",
     28            "surname" => "required|alpha|min:2|max:30",
     29            "phone_number" => "required|unique:users,phone_number,$this->id,id",
     30            "email" => "required|string|email|max:50|unique:users,email,$this->id,id",
     31            "username" => "required|min:5|unique:users,username,$this->id,id",
    3232            "userRole" => "required|exists:roles,id",
    3333            "avatar" => "mimes:jpeg,png,gif|max:5000",
  • app/Http/Requests/Dashboard/UsernameSettingsRequest.php

    r120759b rd795fa6  
    2525    {
    2626        return [
    27             "username" => "required|alpha_dash|min:8|unique:users,username,$this->id,id"
     27            "username" => "required|alpha_dash|min:5|unique:users,username,$this->id,id"
    2828        ];
    2929    }
Note: See TracChangeset for help on using the changeset viewer.