Click or drag to resize
JenevaValidationContext Methods

The JenevaValidationContext type exposes the following members.

Methods
  NameDescription
Public methodAddNested
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.
Public methodAssert
Throws ValidationException if at least one failure was registered
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFail(String)
Registers failure using current path
Public methodFail(Failure)
Registers failure
Public methodFailRoot
Registers failure without path
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsAssigned
True if current field is assigned, otherwise false
Public methodIsNull
True is current field is null, otherwise false
Public methodIsValidFormat
True if current field is correctly parsed, otherwise false
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMustBeAssigned
Validates if current field is assigned (was present in incoming JSON)
Public methodMustBeGreaterOrEqualTo
Validates if current field value (IComparable) is greater or equal to m
Public methodMustBeGreaterThan
Validates if current field value (IComparable) is greater than m
Public methodMustBeLessOrEqualTo
Validates if current field value (IComparable) is less or equal to m
Public methodMustBeLessThan
Validates if current field value (IComparable) is less than m
Public methodMustBeNotAssigned
Validates if current field value is not assigned by JSON deserializer
Public methodMustBeNotEmptyString
Validates if current field value is not string.Empty
Public methodMustBeNotNull
Validates if current field value is not null
Public methodMustBeNull
Validates if current field value is null
Public methodMustBeValidFormat
Validates if current field value is correctly parsed
Public methodMustEqualTo
Validates if current field value is equal to the value
Public methodMustEqualToOneOf
Validates if current field value is equal to one of the values
Public methodMustHaveCountBetween
Validates if current field value count (ICollection.Count) is between min and max count
Public methodMustHaveLengthBetween
Validates if current field value length (string.Length) is between min and max
Public methodMustHaveMaxAssignedFieldsCount
Validates if the number of assigned fields in the current target object is less or equal to max number
Public methodMustHaveMinAssignedFieldsCount
Validates if the number of assigned fields in the current target object is greater or equal to min number
Public methodMustNotEqualTo
Validates if current field value is not equal to the value
Public methodMustNotEqualToAnyOf
Validates if current field value is not equal to any of the values
Public methodMustRegexpr
Validates if current field value follows the regular expression
Public methodRemoveNested
Goes one node back in path.
Public methodSetField
Sets current field (property) name
Public methodSetIndex
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'.
Public methodSetTarget
Sets current target object
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also