Validation Message Fixed

This commit is contained in:
devansh bawari 2021-09-14 17:23:06 +05:30
parent a7619173ad
commit fa18b19e23
13 changed files with 34 additions and 16 deletions

View File

@ -635,7 +635,7 @@ return [
'use_in_flat' => "إنشاء في جدول المنتجات المسطحة",
'is_comparable' => "السمة قابلة للمقارنة",
'default_null_option' => 'إنشاء خيار فارغ افتراضي',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -625,7 +625,7 @@ return [
'use_in_flat' => 'In Produkt Flat Tabelle erstellen',
'is_comparable' => 'Attribut ist vergleichbar',
'default_null_option' => 'Erstellen Sie eine leere Standardoption',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -646,7 +646,7 @@ return [
'use_in_flat' => "Create in Product Flat Table",
'is_comparable' => "Attribute is comparable",
'default_null_option' => 'Create default empty option',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
]
],

View File

@ -646,7 +646,7 @@ return [
'use_in_flat' => "Crear en tabla plana de productos",
'is_comparable' => "El atributo es comparable",
'default_null_option' => 'Crear opción vacía por defecto',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -635,7 +635,7 @@ return [
'use_in_flat' => 'اضافه به جدول flat (product_flat)',
'is_comparable' => "ویژگی قابل مقایسه است",
'default_null_option' => 'گزینه پیش فرض خالی ایجاد کنید',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -645,7 +645,7 @@ return [
'use_in_flat' => 'Créer dans la table plate du produit',
'is_comparable' => 'L\'attribut est comparable',
'default_null_option' => 'Créer une option vide par défaut',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -635,7 +635,7 @@ return [
'use_in_flat' => "Crea in tabella Product flat",
'is_comparable' => "L'attributo è comparabile",
'default_null_option' => 'Crea opzione predefinita vuota',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -632,7 +632,7 @@ return [
'use_in_flat' => "Create in Product Flat Table",
'is_comparable' => "Attribuut is vergelijkbaar ",
'default_null_option' => 'Create default empty option',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -634,7 +634,7 @@ return [
'use_in_flat' => "Utwórz w płaskiej tabeli produktu",
'is_comparable' => "Atrybut jest porównywalny",
'default_null_option' => 'Utwórz domyślną pustą opcję',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -633,7 +633,7 @@ return [
'use_in_flat' => "Criar na tabela plana do produto",
'is_comparable' => "O atributo é comparável",
'default_null_option' => 'Criar opção vazia padrão',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -628,7 +628,7 @@ return [
'use_in_flat' => "Ürün Tablosu Oluştur",
'is_comparable' => "Nitelik kıyaslanabilir",
'default_null_option' => 'Varsayılan boş seçenek oluştur',
'validations' => [
'validation-messages' => [
'max-size' => 'The image size must be less than 600 KB'
],
],

View File

@ -367,7 +367,7 @@
<div class="control-group" :class="[errors.has('options[' + row.id + '][swatch_value]') ? 'has-error' : '']">
<img style="width: 36px;height: 36px;vertical-align: middle;background: #F2F2F2;border-radius: 2px;margin-right: 10px;" v-if="row.swatch_value_url" :src="row.swatch_value_url"/>
<input type="file" v-validate="'size:600'" accept="image/*" :name="'options[' + row.id + '][swatch_value]'"/>
<span class="control-error" v-if="errors.has('options[' + row.id + '][swatch_value]')" v-text="'{{ __('admin::app.catalog.attributes.validations.max-size') }}'"></span>
<span class="control-error" v-if="errors.has('options[' + row.id + '][swatch_value]')" v-text="'{{ __('admin::app.catalog.attributes.validation-messages.max-size') }}'"></span>
</div>
</td>

View File

@ -7,6 +7,12 @@ use Webkul\Attribute\Models\Attribute;
class AttributeCest
{
/**
* Test attribute index page.
*
* @param FunctionalTester $I
* @return void
*/
public function testIndex(FunctionalTester $I): void
{
$attribute = $I->have(Attribute::class);
@ -21,6 +27,12 @@ class AttributeCest
$I->see($attribute->admin_name, '//script[@type="text/x-template"]');
}
/**
* Attribute creation test.
*
* @param FunctionalTester $I
* @return void
*/
public function testCreate(FunctionalTester $I): void
{
$I->loginAsAdmin();
@ -40,6 +52,12 @@ class AttributeCest
$I->seeRecord(Attribute::class, $testData);
}
/**
* Attribute updation test.
*
* @param FunctionalTester $I
* @return void
*/
public function testEdit(FunctionalTester $I): void
{
$attribute = $I->have(Attribute::class, ['use_in_flat' => 0]);
@ -66,11 +84,11 @@ class AttributeCest
}
/**
* @param FunctionalTester $I
* Fill form.
*
* @param bool $skipType
*
* @return array with the test-data
* @param FunctionalTester $I
* @param bool $skipType
* @return array
*/
private function fillForm(FunctionalTester $I, bool $skipType = false): array
{