mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-03 09:57:45 -08:00
scratch code for this issue
This commit is contained in:
parent
c012bf0ece
commit
4841b89109
|
@ -213,6 +213,15 @@ class Asset extends Depreciable
|
||||||
$this->attributes['expected_checkin'] = $value;
|
$this->attributes['expected_checkin'] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function withValidator($validator)
|
||||||
|
{
|
||||||
|
foreach ($this->customFields as $field) {
|
||||||
|
if ($field->isEncrypted()) {
|
||||||
|
Crypt::decrypt($this->value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This handles the custom field validation for assets
|
* This handles the custom field validation for assets
|
||||||
*
|
*
|
||||||
|
|
|
@ -92,6 +92,10 @@ class CustomFieldset extends Model
|
||||||
$rule[] = 'unique_undeleted';
|
$rule[] = 'unique_undeleted';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($field->hasFormat() && $field->isEncrypted()) {
|
||||||
|
$rule[] = $rule.'-encrypted';
|
||||||
|
}
|
||||||
|
|
||||||
array_push($rule, $field->attributes['format']);
|
array_push($rule, $field->attributes['format']);
|
||||||
$rules[$field->db_column_name()] = $rule;
|
$rules[$field->db_column_name()] = $rule;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue