Support the ongoing development of Laravel.io →
Input Validation

Hello

Maybe someone could help me...

i want to validate that a site title and url are unique, only where a record is not deleted.

My Rule:

$rules = array(
    		'title'     => 'Required|Between:5,150|unique:sites,title,deleted_at,NULL',
    		'url'     => 'Required|active_url|unique:sites,url,deleted_at,NULL'
            );

My fields in the DB is title and url...

Some reason doesn't matter, it allows the submission of the same title/url

Last updated 2 years ago.
0

Hello,

Anyone able to help out?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

troiano86 troiano86 Joined 2 Jul 2014

Moderators

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

Your logo here?

Laravel.io

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

© 2025 Laravel.io - All rights reserved.