mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some code cleanup.
This commit is contained in:
@@ -62,21 +62,11 @@ class FireflyValidator extends Validator
|
||||
*/
|
||||
public function validateIban($attribute, $value)
|
||||
{
|
||||
if (!is_string($value)) {
|
||||
return false;
|
||||
}
|
||||
if (is_null($value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strlen($value) === 0) {
|
||||
if (!is_string($value) || is_null($value) || strlen($value) < 6) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$value = strtoupper($value);
|
||||
if (strlen($value) < 6) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$search = [' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
|
||||
$replace = ['', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31',
|
||||
|
Reference in New Issue
Block a user