Merge pull request #5283 from JunaidJaved248/master
SKU Validation Optimization Issue #5279 Fixed
This commit is contained in:
commit
b51595e6a0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=8bcdcf3b86191d1739a5",
|
||||
"/css/admin.css": "/css/admin.css?id=4ed7566377c765482303"
|
||||
"/js/admin.js": "/js/admin.js?id=ae36592d7fe4c08e0c59",
|
||||
"/css/admin.css": "/css/admin.css?id=a3682f955940638778fc"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('sku') ? 'has-error' : '']">
|
||||
<label for="sku" class="required">{{ __('admin::app.catalog.products.sku') }}</label>
|
||||
<input type="text" v-validate="{ required: true, regex: /^[a-z0-9]+(?:-[a-z0-9]+)*$/ }" class="control" id="sku" name="sku" value="{{ request()->input('sku') ?: old('sku') }}" data-vv-as=""{{ __('admin::app.catalog.products.sku') }}""/>
|
||||
<input type="text" v-validate="{ required: true, regex: /^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$/ }" class="control" id="sku" name="sku" value="{{ request()->input('sku') ?: old('sku') }}" data-vv-as=""{{ __('admin::app.catalog.products.sku') }}""/>
|
||||
<span class="control-error" v-if="errors.has('sku')">@{{ errors.first('sku') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<input type="text" v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}" value="{{ old($attribute->code) ?: $product[$attribute->code] }}" {{ in_array($attribute->code, ['sku', 'url_key']) ? 'v-slugify' : '' }} data-vv-as=""{{ $attribute->admin_name }}"" {{ $attribute->code == 'name' && ! $product[$attribute->code] ? 'v-slugify-target=\'url_key\'' : '' }} />
|
||||
<input type="text" v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}" value="{{ old($attribute->code) ?: $product[$attribute->code] }}" {{ in_array($attribute->code, ['url_key']) ? 'v-slugify' : '' }} data-vv-as=""{{ $attribute->admin_name }}"" {{ $attribute->code == 'name' && ! $product[$attribute->code] ? 'v-slugify-target=\'url_key\'' : '' }} />
|
||||
|
|
@ -15,7 +15,7 @@ class Slug implements Rule
|
|||
*/
|
||||
public function passes($attribute, $value)
|
||||
{
|
||||
return preg_match('/^[a-z0-9]+(?:-[a-z0-9]+)*$/', $value);
|
||||
return preg_match('/^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$/', $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue