Laravel Version: 5.7
I want to set a validation. when checkbox is checked, then set a 'between' rule. just like below.
'required|integer|between:1,2'
but when checkbox is not checked is not need between rule like below
'required|integer'
I try to use validation, But I don't know how to set.
//input
<input type="checkbox" name="checkbox">
<input type="number" name="number">
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire