Back to Validation

Roman

docs/validators/Roman.md

3.1.11.5 KB
Original Source
<!-- SPDX-License-Identifier: MIT SPDX-FileCopyrightText: (c) Respect Project Contributors SPDX-FileContributor: Alexandre Gomes Gaigalas <[email protected]> SPDX-FileContributor: Henrique Moody <[email protected]> -->

Roman

  • Roman()

Validates if the input is a Roman numeral.

php
v::roman()->assert('IV');
// Validation passes successfully

Templates

Roman::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must be a Roman numeral
inverted{{subject}} must not be a Roman numeral

Template placeholders

PlaceholderDescription
subjectThe validated input or the custom validator name (if specified).

Categorization

  • Numbers

Changelog

VersionDescription
3.0.0Templates changed
2.0.0Exception message refers to Roman "numerals" instead of "numbers"
2.0.0Do not consider empty strings as valid
0.3.9Created

See Also