How to write a field in laravel that can pass the verification through one rule when there are multiple verification rules?
'alipay'=>array('sometimes','required','email','regex:/^1(3[0-9]|4[57]|5[0-35-9] |7[0135678]|8[0-9])\d{8}$/'),
For example, this verification rule
As long as either the email account or mobile phone account passes, the verification can pass
I have encountered this kind of demand before, and I really didn’t find a native support solution in the documentation. This is what I did in the end, you can refer to it
Custom validation rules