Interface IGetsValueToBeValidated
An object which gets the value to be validated: the "actual" value.
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.Abstractions.dll
Syntax
public interface IGetsValueToBeValidated
Methods
| Improve this Doc View SourceGetValueToBeValidated(ManifestItem, Object, ResolvedValidationOptions)
Attempts to get the value to be validatded from the specified manifest value and parent value instance.
Declaration
GetValueToBeValidatedResponse GetValueToBeValidated(ManifestItem manifestValue, object parentValue, ResolvedValidationOptions validationOptions)
Parameters
Type | Name | Description |
---|---|---|
Manifest |
manifestValue | The manifest value describing the value. |
System. |
parentValue | The previous/parent value, from which the validated value should be derived. |
Resolved |
validationOptions | Validation options. |
Returns
Type | Description |
---|---|
Get |
A result object which indicates success/failure and provides further contextual information. |
Remarks
This method returns a result object indicating the outcome of the attempt. Three different concrete classes may be returned by this method.
- Successful
Get if the attempt is a success.Value To Be Validated Response - Error
Get if the attempt failed and this should result in an error being added to the validation result.Value To Be Validated Response - Ignored
Get if the attempt failed but this should be silently ignored.Value To Be Validated Response
This method might also raise a Validation
Exceptions
Type | Condition |
---|---|
Validation |
If the attempt fails and the error-handling behaviour is Throw. |