Support the ongoing development of Laravel.io →
Configuration Security Input
Last updated 2 years ago.
0

Hi avidh, it seems a bit strange,

I guess you can make a workarround by adding the validation rules in two steps

something like

$rule = array(
   'user_name' => 'required|unique:users,user_name',
   'user_name_lower' => 'not_in:admin,webmaster');

then, in you validator, you should add the user_name_lower with the user_name as lower case.

$arrayToValidate = array_add($arrayToValidate, 'user_name_lower', strtolower($arrayToValidate['user_name']))
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

avidh avidh Joined 12 Feb 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.

© 2024 Laravel.io - All rights reserved.