darg_plus.validators

Validate and parse config files.

Members

Aliases

validate
alias validate = std.exception.enforce!ValidationError

General validation function.

Functions

validateFileExists
void validateFileExists(S file, string msg)

Validates that the files exist.

validateFileExtension
void validateFileExtension(string file, string msg)

Validates that the file has one of the allowed extensions.

validateFileWritable
void validateFileWritable(string file, string msg)

Validates that the file is writable.

validateFilesExist
void validateFilesExist(R files, string msg)

Validates that the files exist.

validatePositive
void validatePositive(V value, string msg)

Validates that value is positive.

validateRangeNonNegativeAscending
void validateRangeNonNegativeAscending(string rangeString, string msg)

Validates that the values described by rangeString are non-negative and in ascending order. Validation is skipped if rangeString is null.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE file.

Authors

Arne Ludwig <arne.ludwig@posteo.de>