mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-01 23:31:50 +02:00
Sanitize and validate
This commit is contained in:
parent
0e135befc2
commit
e00a2985e9
6 changed files with 141 additions and 7 deletions
|
@ -22,10 +22,11 @@ class FinancialsController extends Controller
|
|||
{
|
||||
return view($response,'admin/financials/invoices.twig');
|
||||
}
|
||||
|
||||
|
||||
public function viewInvoice(Request $request, Response $response, $args)
|
||||
{
|
||||
$invoiceNumberPattern = '/^[A-Za-z]+\d+-?\d+$/';
|
||||
$args = trim($args);
|
||||
|
||||
if (preg_match($invoiceNumberPattern, $args)) {
|
||||
$invoiceNumber = $args; // valid format
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue