I have two field qty, status I want to set a rule qty must 'integer' qty required when status is 0. qty can be empty when status is 1 I try to set rules as below
[
'qty' => 'integer|required_if:status,0',
'status' => 'required|integer|between:0,1'
]
But I don't know why when status is 1, do not show required error, but show integer error.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire