firefly-iii/app/lib/Firefly/Validation/FireflyValidator.php
2014-08-30 14:27:05 +02:00

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;
}
}
}