mirror of
https://github.com/Respect/Validation.git
synced 2024-06-29 02:30:06 +02:00
13 lines
246 B
PHP
13 lines
246 B
PHP
<?php
|
|
|
|
namespace Respect\Validation\Rules;
|
|
|
|
class Roman extends Regex
|
|
{
|
|
public function __construct()
|
|
{
|
|
$pattern = '^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$';
|
|
parent::__construct('/'.$pattern.'/');
|
|
}
|
|
}
|