mirror of
https://github.com/Respect/Validation.git
synced 2026-03-18 08:09:51 +01:00
The current documentation is hosted via GitHub pages rendered by "Couscous". Every time we need a new version of the documentation published we need to manually execute the "couscous". This commit reorganize the documentation to be published to "Read the Docs" because it will also allow us to have documentations per version of the library most importantly provider a search field for the documentation. The documentation will be then published on: https://respect-validation.readthedocs.io/ Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
629 B
629 B
StartsWith
v::startsWith(mixed $value)v::startsWith(mixed $value, boolean $identical = false)
This validator is similar to v::contains(), but validates
only if the value is at the beginning of the input.
For strings:
v::startsWith('lorem')->validate('lorem ipsum'); // true
For arrays:
v::startsWith('lorem')->validate(['lorem', 'ipsum']); // true
true may be passed as a parameter to indicate identical comparison
instead of equal.
Message template for this validator includes {{startValue}}.
See also: