Added unique validation for broadband orders, add more visual display that order had errors
This commit is contained in:
parent
eae1b16797
commit
b2e45fcaee
@ -16,7 +16,7 @@ class AdslPlan extends Model
|
|||||||
'options.address'=>[
|
'options.address'=>[
|
||||||
'request'=>'options.address',
|
'request'=>'options.address',
|
||||||
'key'=>'service_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.',
|
'validation_message'=>'Address is a required field.',
|
||||||
],
|
],
|
||||||
'options.notes'=>[
|
'options.notes'=>[
|
||||||
|
@ -28,7 +28,7 @@ trait OrderServiceOptions
|
|||||||
if ((! isset($this->order_attributes)) || (! isset($this->order_model)))
|
if ((! isset($this->order_attributes)) || (! isset($this->order_model)))
|
||||||
return NULL;
|
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;
|
$o = new $this->order_model;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h1>Order Service</h1>
|
<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="order-page" id="order-page">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
|
Loading…
Reference in New Issue
Block a user