A Livewire form component managing POS checkout validation rules including customer, warehouse, tax, and discount. Reuse in point-of-sale systems.
// Source: https://github.com/Zakarialabib/myStockMaster | License: MIT | Copyright 2022 Zakarialabib
// Provided via justclaw.it.com; keep this notice with the code.
<?php
declare(strict_types=1);
namespace App\Livewire\Forms;
use Livewire\Attributes\Validate;
use Livewire\Form;
class PosCheckoutForm extends Form
{
#[Validate('required', message: 'Please provide a customer ID')]
public int|string|null $customer_id = null;
#[Validate('required', message: 'Please provide a warehouse ID')]
public int|string|null $warehouse_id = null;
#[Validate('required|integer|min:0|max:100', message: ['required' => 'Please provide a tax percentage'])]
public int $tax_percentage = 0;
#[Validate('required|integer|min:0|max:100', message: ['required' => 'Please provide a di
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key