respect-validation/library/Rules/Roman.php

13 lines
246 B
PHP
Raw Normal View History

2011-10-25 20:06:43 +02:00
<?php
2015-06-08 16:47:14 +02:00
2011-10-25 20:06:43 +02:00
namespace Respect\Validation\Rules;
class Roman extends Regex
2011-10-25 20:06:43 +02:00
{
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.'/');
2011-10-25 20:06:43 +02:00
}
}