mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-08 23:24:07 -06:00
22 lines
432 B
PHP
22 lines
432 B
PHP
<?php
|
|
namespace Firefly\Validation;
|
|
|
|
use Illuminate\Validation\Validator;
|
|
|
|
/**
|
|
* Class FireflyValidator
|
|
*
|
|
* @package Firefly\Validation
|
|
*/
|
|
class FireflyValidator extends Validator
|
|
{
|
|
public function validateAlphabasic($attribute, $value, $parameters)
|
|
{
|
|
$pattern = '/[^a-z_\-0-9 ]/i';
|
|
if (preg_match($pattern, $value)) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
} |