mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 07:15:45 +01:00
15 lines
327 B
PHP
15 lines
327 B
PHP
<?php
|
|
namespace Respect\Validation\Rules;
|
|
|
|
class No extends Regex
|
|
{
|
|
public function __construct($useLocale = false)
|
|
{
|
|
$pattern = '^n(o(t|pe)?|ix|ay)?$';
|
|
if ($useLocale && defined('NOEXPR')) {
|
|
$pattern = nl_langinfo(NOEXPR);
|
|
}
|
|
|
|
parent::__construct('/'.$pattern.'/i');
|
|
}
|
|
}
|