FareedR
1 year ago
1902
3
Laravel

Validation on required_if

Posted 1 year ago by FareedR

how can i ignore "amount" IF "fee" = 2 ? i keep getting rule for integer on "amount" . do i need to use bail or something else ?

'fee' => 'required',
'amount' => 'required_if:fee,=,1|integer|gte:1',

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