thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.77k stars 2.67k forks source link

Rich text editor doesn't save null #5683

Open ahmetsmc opened 1 year ago

ahmetsmc commented 1 year ago

Laravel version

9.17

PHP version

8.1.4

Voyager version

1.6.x-dev

Database

5.7.39

Description

I have a can translatable rich text editor

class Product extends Model
{
    use Translatable;
    public $translatable = ['body'];
}

Rich text editor validaton in BREAD

{
    "validation": {
        "rule": [
            "nullable",
            "sometimes"
        ]
    }
}

Doesn't save cleanly when rich text editor has value in it

Steps to reproduce

.

Expected behavior

.

Screenshots

.

Additional context

.

syed-reza98 commented 1 year ago

Try to add "sometimes" before "nullable" https://www.leonelngande.com/laravel-validation-sometimes-vs-nullable/