Back to Validation

Executable

docs/validators/Executable.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]> -->

Executable

  • Executable()

Validates if a file is an executable.

php
v::executable()->assert('/path/to/executable');
// Validation passes successfully

v::executable()->assert('/path/to/file');
// → "/path/to/file" must be an accessible existing executable file

Templates

Executable::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must be an accessible existing executable file
inverted{{subject}} must not be an accessible existing executable file

Template placeholders

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

Categorization

  • File system

Changelog

VersionDescription
3.0.0Templates changed
0.7.0Created

See Also