| JenevaValidationContext Class |
Namespace: Jeneva.Validation.Impl
The JenevaValidationContext type exposes the following members.
| Name | Description | |
|---|---|---|
| JenevaValidationContext |
Initializes new instance of the ValidationContext class
|
| Name | Description | |
|---|---|---|
| AddNested |
Propagates current field to path.
For ex. if current field is 'User', call AddNested(), then call SetField("Name", null) - the failure path would be - User.Name.
Usually after AddNested() call, SetTarget() must be called as well.
| |
| Assert |
Throws ValidationException if at least one failure was registered
| |
| Equals | (Inherited from Object.) | |
| Fail(String) |
Registers failure using current path
| |
| Fail(Failure) |
Registers failure
| |
| FailRoot |
Registers failure without path
| |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IsAssigned |
True if current field is assigned, otherwise false
| |
| IsNull |
True is current field is null, otherwise false
| |
| IsValidFormat |
True if current field is correctly parsed, otherwise false
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MustBeAssigned |
Validates if current field is assigned (was present in incoming JSON)
| |
| MustBeGreaterOrEqualTo |
Validates if current field value (IComparable) is greater or equal to m
| |
| MustBeGreaterThan |
Validates if current field value (IComparable) is greater than m
| |
| MustBeLessOrEqualTo |
Validates if current field value (IComparable) is less or equal to m
| |
| MustBeLessThan |
Validates if current field value (IComparable) is less than m
| |
| MustBeNotAssigned |
Validates if current field value is not assigned by JSON deserializer
| |
| MustBeNotEmptyString |
Validates if current field value is not string.Empty
| |
| MustBeNotNull |
Validates if current field value is not null
| |
| MustBeNull |
Validates if current field value is null
| |
| MustBeValidFormat |
Validates if current field value is correctly parsed
| |
| MustEqualTo |
Validates if current field value is equal to the value
| |
| MustEqualToOneOf |
Validates if current field value is equal to one of the values
| |
| MustHaveCountBetween |
Validates if current field value count (ICollection.Count) is between min and max count
| |
| MustHaveLengthBetween |
Validates if current field value length (string.Length) is between min and max
| |
| MustHaveMaxAssignedFieldsCount |
Validates if the number of assigned fields in the current target object is less or equal to max number
| |
| MustHaveMinAssignedFieldsCount |
Validates if the number of assigned fields in the current target object is greater or equal to min number
| |
| MustNotEqualTo |
Validates if current field value is not equal to the value
| |
| MustNotEqualToAnyOf |
Validates if current field value is not equal to any of the values
| |
| MustRegexpr |
Validates if current field value follows the regular expression
| |
| RemoveNested |
Goes one node back in path.
| |
| SetField |
Sets current field (property) name
| |
| SetIndex |
Sets current index (used for indexed properties).
For ex. current target is 'Children' and index is '7' and field 'Name' - failure would have this path - 'children[7].name'.
| |
| SetTarget |
Sets current target object
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
| failures |
List of registered failures
| |
| fieldName |
Name of the current validated field
| |
| fieldValue |
Value of the current validated field
|
| Name | Description | |
|---|---|---|
| IsFieldValid |
False, if at least on failure is recorded for the current field, otherwise true
| |
| IsTargetValid |
False, if at least on failure is recorded for the current target, otherwise true
| |
| IsValid |
False, if at least on failure is recorded, otherwise true
| |
| Math |
Gets Math helper object
|