IWbsFieldValidator Interface
Name | Description | |
---|---|---|
Validate(IWbsField) | Validates a WBS field. | |
Validate(IWbsField, IEnumerable<IWbsField>) | Validates a WBS field. |
The validator is used internally by IWbsFieldsRepository when it adds or updates the fields. When a problem occurs, the InvalidWbsFieldException with a corresponding IWbsFieldValidationResult will be thrown.
So normally, you don't need to use the validator manually. But if you want to test your added or modified fields before applying the changes to the repository, you can call methods of this interface yourself. You can get a validator instance from IWbsFieldsRepository.Validator property.
Note that the repository uses more strict validation that is publicly available via this interface. It may happen, that you still get a validation error when you update your field in the repository, even though your manual validation didn't produce any errors.