Added unique validation for broadband orders, add more visual display that order had errors

This commit is contained in:
Deon George 2021-09-28 14:55:03 +10:00
parent eae1b16797
commit b2e45fcaee
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
3 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ class AdslPlan extends Model
'options.address'=>[
'request'=>'options.address',
'key'=>'service_address',
'validation'=>'required|string:10',
'validation'=>'required|string:10|unique:ab_service__adsl,service_address',
'validation_message'=>'Address is a required field.',
],
'options.notes'=>[

View File

@ -28,7 +28,7 @@ trait OrderServiceOptions
if ((! isset($this->order_attributes)) || (! isset($this->order_model)))
return NULL;
$validate = $request->validate(collect($this->order_attributes)->pluck('validation','request')->toArray());
$request->validate(collect($this->order_attributes)->pluck('validation','request')->toArray());
$o = new $this->order_model;

View File

@ -9,7 +9,7 @@
<div class="container">
<div class="col-12">
<h1>Order Service</h1>
@if ($errors->count()))<h4><span class="note-danger">There were errors with your order, please try again.</span></h4>@endif
<div class="order-page" id="order-page">
<div class="row">
<div class="col-3">