Removed debugging

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-11-21 13:47:49 +00:00
parent 2b9e4110bc
commit 766eee78b2

View file

@ -63,12 +63,11 @@ class ValidationServiceProvider extends ServiceProvider
* `unique_undeleted:table,fieldname` in your rules out of the box
*/
Validator::extend('unique_undeleted', function ($attribute, $value, $parameters, $validator) {
if (count($parameters)) {
// This is a bit of a shim, but serial doesn't have any other rules around it other than that it's nullable
if (($parameters[0]=='assets') && ($attribute == 'serial') && (Setting::getSettings()->unique_serial != '1')) {
\Log::debug('Checking for serial and it is not unique');
return true;
}