/src/NJsonSchema/Validation/ValidationErrorKind.cs

https://github.com/RSuter/NJsonSchema · C# · 146 lines · 50 code · 44 blank · 52 comment · 0 complexity · 6f50a6711a0590445bf6df16ca919185 MD5 · raw file

  1. //-----------------------------------------------------------------------
  2. // <copyright file="ValidationErrorKind.cs" company="NJsonSchema">
  3. // Copyright (c) Rico Suter. All rights reserved.
  4. // </copyright>
  5. // <license>https://github.com/RicoSuter/NJsonSchema/blob/master/LICENSE.md</license>
  6. // <author>Rico Suter, mail@rsuter.com</author>
  7. //-----------------------------------------------------------------------
  8. namespace NJsonSchema.Validation
  9. {
  10. /// <summary>Enumeration of the possible error kinds. </summary>
  11. public enum ValidationErrorKind
  12. {
  13. /// <summary>An unknown error. </summary>
  14. Unknown,
  15. /// <summary>A string is expected. </summary>
  16. StringExpected,
  17. /// <summary>A number is expected. </summary>
  18. NumberExpected,
  19. /// <summary>An integer is expected. </summary>
  20. IntegerExpected,
  21. /// <summary>A boolean is expected. </summary>
  22. BooleanExpected,
  23. /// <summary>An object is expected. </summary>
  24. ObjectExpected,
  25. /// <summary>The property is required but not found. </summary>
  26. PropertyRequired,
  27. /// <summary>An array is expected. </summary>
  28. ArrayExpected,
  29. /// <summary>An array is expected. </summary>
  30. NullExpected,
  31. /// <summary>The Regex pattern does not match. </summary>
  32. PatternMismatch,
  33. /// <summary>The string is too short. </summary>
  34. StringTooShort,
  35. /// <summary>The string is too long. </summary>
  36. StringTooLong,
  37. /// <summary>The number is too small. </summary>
  38. NumberTooSmall,
  39. /// <summary>The number is too big. </summary>
  40. NumberTooBig,
  41. /// <summary>The integer is too big. </summary>
  42. IntegerTooBig,
  43. /// <summary>The array contains too many items. </summary>
  44. TooManyItems,
  45. /// <summary>The array contains too few items. </summary>
  46. TooFewItems,
  47. /// <summary>The items in the array are not unique. </summary>
  48. ItemsNotUnique,
  49. /// <summary>A date time is expected. </summary>
  50. DateTimeExpected,
  51. /// <summary>A date is expected. </summary>
  52. DateExpected,
  53. /// <summary>A time is expected. </summary>
  54. TimeExpected,
  55. /// <summary>A time-span is expected. </summary>
  56. TimeSpanExpected,
  57. /// <summary>An URI is expected. </summary>
  58. UriExpected,
  59. /// <summary>An IP v4 address is expected. </summary>
  60. IpV4Expected,
  61. /// <summary>An IP v6 address is expected. </summary>
  62. IpV6Expected,
  63. /// <summary>A valid GUID is expected. </summary>
  64. GuidExpected,
  65. /// <summary>The object is not any of the given schemas. </summary>
  66. NotAnyOf,
  67. /// <summary>The object is not all of the given schemas. </summary>
  68. NotAllOf,
  69. /// <summary>The object is not one of the given schemas. </summary>
  70. NotOneOf,
  71. /// <summary>The object matches the not allowed schema. </summary>
  72. ExcludedSchemaValidates,
  73. /// <summary>The number is not a multiple of the given number. </summary>
  74. NumberNotMultipleOf,
  75. /// <summary>The integer is not a multiple of the given integer. </summary>
  76. IntegerNotMultipleOf,
  77. /// <summary>The value is not one of the allowed enumerations. </summary>
  78. NotInEnumeration,
  79. /// <summary>An Email is expected. </summary>
  80. EmailExpected,
  81. /// <summary>An hostname is expected. </summary>
  82. HostnameExpected,
  83. /// <summary>The array tuple contains too many items. </summary>
  84. TooManyItemsInTuple,
  85. /// <summary>An array item is not valid. </summary>
  86. ArrayItemNotValid,
  87. /// <summary>The item is not valid with the AdditionalItems schema. </summary>
  88. AdditionalItemNotValid,
  89. /// <summary>The additional properties are not valid. </summary>
  90. AdditionalPropertiesNotValid,
  91. /// <summary>Additional/unspecified properties are not allowed. </summary>
  92. NoAdditionalPropertiesAllowed,
  93. /// <summary>There are too many properties in the object. </summary>
  94. TooManyProperties,
  95. /// <summary>There are too few properties in the tuple. </summary>
  96. TooFewProperties,
  97. /// <summary>A Base64 string is expected. </summary>
  98. Base64Expected,
  99. /// <summary>No type of the types does validate (check error details in <see cref="MultiTypeValidationError"/>). </summary>
  100. NoTypeValidates
  101. }
  102. }