How does laravel verify that one of the two fields is required?

WBOY
Release: 2023-03-02 08:50:02
Original
2061 people have browsed it

For example: if email and phone are filled in, the verification will be passed. How to write the verification rules?

Reply content:

For example: if email and phone are filled in, the verification will be passed. How to write the verification rules?

<code>'email' => 'required_without:phone',
'phone' => 'required_without:email',</code>
Copy after login

For details, please see:
https://laravel.com/docs/5.3/...

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!