Back to Validation

Vowel

docs/validators/Vowel.md

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

Vowel

  • Vowel()
  • Vowel(string ...$additionalChars)

Validates whether the input contains only vowels.

php
v::vowel()->assert('aei');
// Validation passes successfully

Templates

Vowel::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must consist of vowels only
inverted{{subject}} must not consist of vowels only

Vowel::TEMPLATE_EXTRA

ModeTemplate
default{{subject}} must consist of vowels or {{additionalChars}}
inverted{{subject}} must not consist of vowels or {{additionalChars}}

Template placeholders

PlaceholderDescription
additionalCharsAdditional characters that are considered valid.
subjectThe validated input or the custom validator name (if specified).

Categorization

  • Strings

Changelog

VersionDescription
3.0.0Templates changed
2.0.0Do not consider whitespaces as valid
0.5.0Renamed from Vowels to Vowel
0.3.9Created as Vowels

See Also