mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-08 07:03:23 -06:00
22 lines
467 B
PHP
22 lines
467 B
PHP
<?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;
|
|
}
|
|
}
|
|
} |