Support the ongoing development of →
Requests Database Validation
Last updated 1 year ago.

Not entirely sure if you can do that with the built-in email validation rule. A simple dirty way would be to do a simple if-check and skip email validation if the input email is one of your selected emails.


true, this could be a neat and simple solution. But how do I implement that solution while using form-request-validation?


I would guess you have to extend the validator and create a custom unique rule that accepts exceptions in string format. Read up on extending the validator and check out the validateUnique method in this file:

You can use that as a base for your extension and just add what you need.


If you need just a couple objects (users) it's easier to create them manually in php artisan tinker console, than to write a custom validator with an exception.


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.