Back to Validation

Version

docs/validators/Version.md

3.1.11.2 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]> -->

Version

  • Version()

Validates version numbers using Semantic Versioning.

php
v::version()->assert('1.0.0');
// Validation passes successfully

Templates

Version::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must be a version number
inverted{{subject}} must not be a version number

Template placeholders

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

Categorization

  • Strings

Changelog

VersionDescription
3.0.0Templates changed
0.3.9Created

See Also