Support the ongoing development of →
Configuration Security Input
Last updated 1 year ago.

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 1 year ago.

Sign in to participate in this thread!


Your banner here too?

avidh avidh Joined 12 Feb 2014


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.