Crud: [Bug] required field "red star" after <label> tag disappears when wrapper added into field

Created on 22 May 2020  路  5Comments  路  Source: Laravel-Backpack/CRUD

Bug report

when we adding in Crud file for fields

'wrapper' => [
     'class' => 'my-2 col-md-4'
],

What I expected to happen

required fields should be marked with "red star" after label

What happened

it disappears.

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:
4.1.6

Bug

All 5 comments

Hello @siberfx can you show me your field definition ?

We use wrapper in an required field in demo and it still have the red asterisk there.

https://github.com/Laravel-Backpack/demo/blob/604201bf076bb8e03ae1fd701d5de07d1d132e9b/app/Http/Controllers/Admin/MonsterCrudController.php#L398

image
image
image
here you go.

I am sorry, but I am still unable to reproduce this.

Field

[ // select_from_array
                'name'              => 'select_from_array',
                'label'             => 'Select_from_array (no relationship, 1-1 or 1-n)',
                'type'              => 'select_from_array',
                'options'           => ['one' => 'One', 'two' => 'Two', 'three' => 'Three'],
                'allows_null'       => false,
                'tab'               => 'Selects',
                //'allows_multiple'   => false, // OPTIONAL; needs you to cast this to array in your model;
                'wrapper' => ['class' => 'form-group col-md-6'],
            ],

Request

    public function rules()
    {
        return [
            'select_from_array' => 'required'
        ];
    }

Result

Screenshot_10

you can close this issue, I will investigate it myself and I can create another report with the exact reason that causing this issue. thank you for your time.

Thank you for being so understanding @siberfx !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexanderWM picture AlexanderWM  路  3Comments

deepaksp picture deepaksp  路  3Comments

sokvebolkol picture sokvebolkol  路  3Comments

dividy picture dividy  路  3Comments

mikael1000 picture mikael1000  路  3Comments