mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 23:50:09 +00:00
Various changes to support the removed old code.
This commit is contained in:
22
app/lib/FireflyIII/Shared/Validation/FireflyValidator.php
Normal file
22
app/lib/FireflyIII/Shared/Validation/FireflyValidator.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace FireflyIII\Shared\Validation;
|
||||
|
||||
use Illuminate\Validation\Validator;
|
||||
|
||||
/**
|
||||
* Class FireflyValidator
|
||||
*
|
||||
* @package FireflyIII\Shared\Validation
|
||||
*/
|
||||
class FireflyValidator extends Validator
|
||||
{
|
||||
public function validateAlphabasic($attribute, $value, $parameters)
|
||||
{
|
||||
$pattern = '/[^[:alnum:]_\-\.\& \(\)\'"]/iu';
|
||||
if (preg_match($pattern, $value)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user