mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-31 16:37:27 -08:00
note and rm dump and comment
This commit is contained in:
parent
7e7cbc4cc8
commit
8c6869fd34
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue