Laravel do not validate if field is not required
digits:10
is completely separate from required_if
, so it will validate whether or not the field is required. However, if you want to also allow null or empty values (assuming the field is not required), you can add the rule nullable
.