scratch code for this issue

This commit is contained in:
spencerrlongg 2024-11-13 12:45:39 -06:00
parent c012bf0ece
commit 4841b89109
2 changed files with 13 additions and 0 deletions

View file

@ -213,6 +213,15 @@ class Asset extends Depreciable
$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
*

View file

@ -92,6 +92,10 @@ class CustomFieldset extends Model
$rule[] = 'unique_undeleted';
}
if ($field->hasFormat() && $field->isEncrypted()) {
$rule[] = $rule.'-encrypted';
}
array_push($rule, $field->attributes['format']);
$rules[$field->db_column_name()] = $rule;