1<?php
2
3/*
4 * This file is part of Respect/Validation.
5 *
6 * (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
7 *
8 * For the full copyright and license information, please view the "LICENSE.md"
9 * file that was distributed with this source code.
10 */
11
12namespace Respect\Validation\Rules;
13
14class Roman extends Regex
15{
16    public function __construct()
17    {
18        $pattern = '^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$';
19        parent::__construct('/'.$pattern.'/');
20    }
21}
22