You do not have to use email as a required field. You can have username or userid instead. And of course password. I'd always have at least 2 fields. You could for example set up an if statement and let user decide to use email or userid then password. Some sites do it that way. Just set up the correct control logic.
From the docs:
Note: In this example, email is not a required option, it is merely used as an example. You should use whatever column name corresponds to a "username" in your database.
I don't understand becouse I have not use email.
But my question is about the complete use of "sometimes", suppose if I delete a form field using Chrome inspector, the validation will pass if I use "required|sometimes".
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community