Skip to content

Commit

Permalink
Add server side validation for the forms for words and pages count
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed Jun 16, 2024
1 parent b3e32ed commit 702e2e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Livewire/OrderCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Http\RedirectResponse;
use Illuminate\View\View;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Order;
use Livewire\Features\SupportRedirects\Redirector;
Expand All @@ -18,7 +19,9 @@ class OrderCreate extends Component
public $total_price;
public $loggedInUser;
public $isWords;
#[Validate('numeric|min:1')]
public $words;
#[Validate('numeric|min:1')]
public $pages;

public array $attachments = [];
Expand Down

0 comments on commit 702e2e1

Please sign in to comment.