app/Http/Requests/CreateUser.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'firstname' => 'required|alpha|max:20',
            'lastname' => 'required|alpha|max:20',
            'username' => 'required|max:20|unique:users,uname|alpha_num',
            'email' => 'required|email|unique:users,email',
            'password' => 'required|confirmed|min:5|max:20'
        ];
    }
public function rules ( ) { return [ 'firstname' => 'required|alpha|max:20' , 'lastname' => 'required|alpha|max:20' , 'username' => 'required|max:20|unique:users,uname|alpha_num' , 'email' => 'required|email|unique:users,email' , 'password' => 'required|confirmed|min:5|max:20' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .