Added asterisk in description fields of catalog rule update and create
This commit is contained in:
parent
afafdfbfcd
commit
3a9143462e
|
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
|
||||
<label for="description">{{ __('admin::app.promotion.general-info.description') }}</label>
|
||||
<label for="description" class="required">{{ __('admin::app.promotion.general-info.description') }}</label>
|
||||
|
||||
<textarea class="control" name="description" v-model="description" v-validate="'required'" value="{{ old('description') }}" data-vv-as=""{{ __('admin::app.promotion.general-info.description') }}""></textarea>
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
|
||||
<label for="description">{{ __('admin::app.promotion.general-info.description') }}</label>
|
||||
<label for="description" class="required">{{ __('admin::app.promotion.general-info.description') }}</label>
|
||||
|
||||
<textarea class="control" name="description" v-model="description" v-validate="'required'" value="{{ old('description') }}" data-vv-as=""{{ __('admin::app.promotion.general-info.description') }}""></textarea>
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,13 @@ use Webkul\Core\Repositories\LocaleRepository as Locale;
|
|||
{
|
||||
$data = request()->all();
|
||||
|
||||
// part one of the validation in case partials pages were generated or generating partial pages
|
||||
$this->validate(request(), [
|
||||
'channels' => 'required',
|
||||
'locales' => 'required',
|
||||
'url_key' => 'required'
|
||||
]);
|
||||
|
||||
$channels = request()->input('channels');
|
||||
|
||||
$locales = request()->input('locales');
|
||||
|
|
@ -109,20 +116,21 @@ use Webkul\Core\Repositories\LocaleRepository as Locale;
|
|||
}
|
||||
}
|
||||
|
||||
if (count($ignorePageIDs)) {
|
||||
if (! count($ignorePageIDs)) {
|
||||
$this->validate(request(), [
|
||||
'channels' => 'required',
|
||||
'locales' => 'required',
|
||||
'url_key' => 'required|unique:cms_pages,url_key,'.$ignorePageIDs,
|
||||
'html_content' => 'required|string',
|
||||
'page_title' => 'required|string',
|
||||
'meta_title' => 'required|string',
|
||||
'meta_description' => 'string',
|
||||
'meta_keywords' => 'required|string'
|
||||
'url_key' => 'unique:cms_pages,url_key,'
|
||||
]);
|
||||
}
|
||||
|
||||
$data = request()->all();
|
||||
$this->validate(request(), [
|
||||
'channels' => 'required',
|
||||
'locales' => 'required',
|
||||
'html_content' => 'required|string',
|
||||
'page_title' => 'required|string',
|
||||
'meta_title' => 'required|string',
|
||||
'meta_description' => 'string',
|
||||
'meta_keywords' => 'required|string'
|
||||
]);
|
||||
|
||||
foreach ($data['channels'] as $channel) {
|
||||
foreach ($data['locales'] as $locale) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue