Skip to content

Commit 0a992f9

Browse files
bugfixing
1 parent 1f6171e commit 0a992f9

24 files changed

+496
-210
lines changed

app/Http/Livewire/Auth/Login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class Login extends Component
1313
public $remember_me = false;
1414

1515
protected $rules = [
16-
'email' => 'required|email',
17-
'password' => 'required',
16+
'email' => 'required|email:rfc,dns',
17+
'password' => 'required|min:6',
1818
];
1919

2020
//This mounts the default credentials for the admin. Remove this section if you want to make it public.

app/Http/Livewire/Auth/Register.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Register extends Component
1616

1717
public function updatedEmail()
1818
{
19-
$this->validate(['email'=>'required|email|unique:users']);
19+
$this->validate(['email'=>'required|email:rfc,dns|unique:users']);
2020
}
2121

2222
public function register()

app/Http/Livewire/Profile.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace App\Http\Livewire;
44

55
use App\Models\User;
6+
use Illuminate\Support\Facades\Validator;
7+
use Illuminate\Validation\Rule;
68
use Livewire\Component;
79

810
class Profile extends Component
@@ -11,18 +13,19 @@ class Profile extends Component
1113
public $showSavedAlert = false;
1214
public $showDemoNotification = false;
1315

14-
protected $rules = [
16+
public function rules() {
17+
18+
return [
1519
'user.first_name' => 'max:15',
1620
'user.last_name' => 'max:20',
17-
'user.birthday' => 'date_format:Y-m-d',
1821
'user.email' => 'email',
19-
'user.phone' => 'numeric',
20-
'user.gender' => '',
21-
'user.address' => 'max:20',
22+
'user.gender' => ['required', Rule::in(['Male', 'Female', 'Other'])],
23+
'user.address' => 'max:40',
2224
'user.number' => 'numeric',
2325
'user.city' => 'max:20',
2426
'user.ZIP' => 'numeric',
2527
];
28+
}
2629

2730
public function mount() { $this->user = auth()->user(); }
2831

app/Http/Livewire/ProfileExample.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace App\Http\Livewire;
4+
5+
use Livewire\Component;
6+
7+
class ProfileExample extends Component
8+
{
9+
public function render()
10+
{
11+
return view('livewire.profile-example');
12+
}
13+
}

database/factories/UserFactory.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public function definition()
3030
'email' => $this->faker->unique()->safeEmail(),
3131
'email_verified_at' => now(),
3232
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
33-
'phone' => $this->faker->phoneNumber,
34-
'birthday' => $this->faker->dateTimeThisCentury,
3533
'address' => $this->faker->address,
3634
'city' => $this->faker->city,
3735
'ZIP' => $this->faker->randomNumber(6),

database/migrations/2014_10_12_000000_create_users_table.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ public function up()
2020
$table->string('gender')->nullable();
2121
$table->string('email')->unique();
2222
$table->string('password');
23-
$table->date('birthday')->nullable();
2423
$table->string('address')->nullable();
2524
$table->string('number')->nullable();
2625
$table->string('city')->nullable();
2726
$table->string('ZIP')->nullable();
28-
$table->string('phone')->nullable();
2927
$table->timestamp('email_verified_at')->nullable();
3028
$table->rememberToken()->unique();
3129
$table->timestamps();

public/css/volt.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,7 +3156,7 @@ textarea.form-control-lg {
31563156
border-bottom-left-radius: 0; }
31573157

31583158
.valid-feedback {
3159-
display: none;
3159+
display: block;
31603160
width: 100%;
31613161
margin-top: 0.25rem;
31623162
font-size: 0.875em;
@@ -3229,7 +3229,8 @@ textarea.form-control-lg {
32293229
z-index: 3; }
32303230

32313231
.invalid-feedback {
3232-
display: none;
3232+
/* display: none; */
3233+
display: block;
32333234
width: 100%;
32343235
margin-top: 0.25rem;
32353236
font-size: 0.875em;

resources/views/components/buttons.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<p class="mb-0">Dozens of reusable components built to provide buttons, alerts, popovers, and more.</p>
1717
</div>
1818
<div>
19-
<a href="https://themesberg.com/docs/volt-bootstrap-5-dashboard/components/buttons/" class="btn btn-outline-gray"><i class="far fa-question-circle me-1"></i> Buttons Docs</a>
19+
<a href="/documentation/components/buttons/index.html" class="btn btn-outline-gray" target="_blank"><i class="far fa-question-circle me-1"></i> Buttons Docs</a>
2020
</div>
2121
</div>
2222
</div>

resources/views/components/forms.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<p class="mb-0">Dozens of reusable components built to provide buttons, alerts, popovers, and more.</p>
1717
</div>
1818
<div>
19-
<a href="https://themesberg.com/docs/volt-bootstrap-5-dashboard/components/forms/" class="btn btn-outline-gray"><i class="far fa-question-circle me-1"></i> Forms Docs</a>
19+
<a href="/documentation/components/forms/index.html" class="btn btn-outline-gray" target="_blank"><i class="far fa-question-circle me-1"></i> Forms Docs</a>
2020
</div>
2121
</div>
2222
</div>

resources/views/components/modals.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<p class="mb-0">Dozens of reusable components built to provide buttons, alerts, popovers, and more.</p>
1717
</div>
1818
<div>
19-
<a href="https://themesberg.com/docs/volt-bootstrap-5-dashboard/components/modals/" class="btn btn-outline-gray"><i class="far fa-question-circle me-1"></i> Modals Docs</a>
19+
<a href="/documentation/components/modals/index.html" class="btn btn-outline-gray" target="_blank"><i class="far fa-question-circle me-1"></i> Modals Docs</a>
2020
</div>
2121
</div>
2222
</div>

0 commit comments

Comments
 (0)