Skip to main content

Module validation

Module validation 

Source
Expand description

This module contains methods to validate TimeLogs and report possible problems. They are implemented via the validator chain pattern.

Structs§

BeforeStartDateValidator
Validates that a time log date is not before the project start date.
DuplicatesValidator
Validates that a time log does not contain duplicates (same user, date, trackable item, time spent and summary)
ExcessiveHoursValidator
Validates that a single time log does not exceed the given maximum hours.
HasSummaryValidator
Validates that a time log has a summary.
NoFutureDateValidator
Validates that a time log has no date in the future.
TimeLogValidator
The main validator that runs all validators. Add the other validators to this one with TimeLogValidator::with_validator, then call TimeLogValidator::validate to run the validation.
ValidationResult
Stores the result of a validation run.

Enums§

ValidationProblem
Possible problems in TimeLog that can be found during validation.

Traits§

Validator
Trait functions that a validator must implement.