note and rm dump and comment

This commit is contained in:
spencerrlongg 2024-11-13 21:59:32 -06:00
parent 7e7cbc4cc8
commit 8c6869fd34
2 changed files with 2 additions and 12 deletions

View file

@ -215,16 +215,6 @@ class Asset extends Depreciable
$this->attributes['expected_checkin'] = $value;
}
// i don't think this will work the way we'd need it to
//public function withValidator(Validator $validator)
//{
// foreach ($this->customFields as $field) {
// if ($field->field_encrypted) {
// return Crypt::decrypt($this->value);
// }
// }
//}
/**
* This handles the custom field validation for assets
*

View file

@ -98,6 +98,8 @@ class CustomFieldset extends Model
$rules[$field->db_column_name()] = $rule;
// these are to replace the standard 'numeric' and 'alpha' rules if the custom field is also encrypted.
// the values need to be decrypted first, because encrypted strings are alphanumeric
if ($field->format === 'NUMERIC' && $field->field_encrypted) {
$numericKey = array_search('numeric', $rules[$field->db_column_name()]);
$rules[$field->db_column_name()][$numericKey] = new NumericEncrypted;
@ -122,8 +124,6 @@ class CustomFieldset extends Model
}
}
dump($rules);
return $rules;
}
}