pwd_secure_uncommon == 1) { $security_rules .= '|dumbpwd'; } // Check for any secure password complexity rules that may have been selected if ($settings->pwd_secure_complexity!='') { $security_rules .= '|'.$settings->pwd_secure_complexity; } if ((\Route::currentRouteName()=='api.users.update') || (\Route::currentRouteName()=='users.update')) { $rules['password'] = 'nullable|min:'.$settings->pwd_secure_min.$security_rules; } else { $rules['password'] = 'required|min:'.$settings->pwd_secure_min.$security_rules; } $rules['password_confirm'] = 'sometimes|required_with:password'; return $rules; } }