isimelek
4 months ago
564
3
Nova

Array field validation

Posted 4 months ago by isimelek

How can I validate array field?

Text::make($lang->name,  'translation[]')->rules(['translation.*'=>'required']);

In the model is

    protected $casts = [
        'translation'=>'array'
    ];

always get validation.required error for filled out input

I also tried without [] in the name of the field, but in this case is not recognized as an array

Please sign in or create an account to participate in this conversation.